Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Commit 544784e

Browse files
committed
Add fs.df JS interface #162
1 parent 0a0d8fd commit 544784e

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/fs.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,17 @@ function isDir(path:string):Promise<bool, bool> {
338338

339339
}
340340

341+
function df():Promise<{ free : number, total : number }> {
342+
return new Promise((resolve, reject) => {
343+
RNFetchBlob.df((err, stat) => {
344+
if(err)
345+
reject(err)
346+
else
347+
resolve(stat)
348+
})
349+
})
350+
}
351+
341352
export default {
342353
RNFetchBlobSession,
343354
unlink,
@@ -359,5 +370,6 @@ export default {
359370
scanFile,
360371
dirs,
361372
slice,
362-
asset
373+
asset,
374+
df
363375
}

0 commit comments

Comments
 (0)