Lines Matching refs:fs

13 …re stored in **@ohos.fileio**, and the new ones are stored in **@ohos.file.fs**. The newly added A…
19 | @ohos.file.fs | **function** open(path: string, mode?: number, callback?: AsyncCallback<File>): …
20 | @ohos.file.fs | **function** openSync(path: string, mode?: number): File; | Added |
23 | @ohos.file.fs | **function** read(fd: number, buffer: ArrayBuffer, options?: { offset?: number; l…
24 | @ohos.file.fs | **function** readSync(fd: number, buffer: ArrayBuffer, options?: { offset?: numbe…
29 | @ohos.file.fs | **function** stat(file: string \| number, callback?: AsyncCallback<Stat>): void \…
30 | @ohos.file.fs | **function** statSync(file: string \| number): Stat; | Added |
35 | @ohos.file.fs | **function** truncate(file: string \| number, len?: number, callback?: AsyncCallb…
36 | @ohos.file.fs | **function** truncateSync(file: string \| number, len?: number): void; | Added …
39 | @ohos.file.fs | **function** write(fd: number, buffer: ArrayBuffer \| string, options?: { offset?…
40 | @ohos.file.fs | **function** writeSync(fd: number, buffer: ArrayBuffer \| string, options?: { off…
50 The new APIs use **@ohos.file.fs**, which is imported as follows:
53 import fs from '@ohos.file.fs';
58 import fs from '@ohos.file.fs'
61 let file = fs.openSync(path, fs.OpenMode.READ_ONLY);
68 import fs from '@ohos.file.fs'
71 let file = await fs.open(path, fs.OpenMode.READ_ONLY);
79 import fs from '@ohos.file.fs'
82fs.open(path, fs.OpenMode.READ_ONLY, function(e, file){ // Asynchronous thread (such as system cal…