0.0.7 • Published 7 years ago

react-native-lite-fs v0.0.7

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
7 years ago

react-native-lite-fs

Install

npm install --save react-native-lite-fs

API

type Callback = (error: Error, result: any)=> any;
type Path = string;
type Content = Buffer | string | ArrayBuffer;
exists (p: Path)=> Promise
  • 0 不存在
  • 1 文件夹
  • 2 文件
stat (p: Path)=> Promise<{length: number, ctime: number, mtime: number, flag: number}>

Android 中没有 ctime;

mkdir (p: Path, auto: boolean = false)=> Promise
touch (p: Path, auto: bool)=> Promise
readir (p: Path)=> Promise
copy (src: Path, to: Path)=> Promise
move (src: Path, to: Path=> Promise
remove (item: Path)=> Promise
writeFile (p: Path, content: Content)=> Promise

返回写入的字节数

readFile (p: Path)=> Promise
open (p: Path)=> Promise

File

close ()=> Promise
tell ()=> Promise
seek (offset = 0, )=> Promise
read (length: number = DEFAULT_BUFFER_LENGTH, )=> Promise
write (content: Content, )=> Promise
truncate (length: number, )=> Promise
0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago