Skip to content

Commit 7da0513

Browse files
author
Andrea Tosatto
committed
Fix to README and wrong edit to normalizeFilePath
1 parent 64f165f commit 7da0513

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

FS.common.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var getJobId = () => {
2525
return jobId;
2626
};
2727

28-
var normalizeFilePath = (path: string) => (path.startsWith('file://') && !path.startsWith('content://') ? path.slice(7) : path);
28+
var normalizeFilePath = (path: string) => (path.startsWith('file://') ? path.slice(7) : path);
2929

3030
type MkdirOptions = {
3131
NSURLIsExcludedFromBackupKey?: boolean; // iOS only
@@ -42,13 +42,13 @@ type ReadDirItem = {
4242
};
4343

4444
type StatResult = {
45-
name: ?string; // The name of the item
45+
name: ?string; // The name of the item TODO: why is this not documented?
4646
path: string; // The absolute path to the item
4747
size: string; // Size in bytes
4848
mode: number; // UNIX file mode
4949
ctime: number; // Created date
5050
mtime: number; // Last modified date
51-
originalFilepath: ?string; // In case of content uri this is the pointed file path, otherwise is the same as path
51+
originalFilepath: string; // In case of content uri this is the pointed file path, otherwise is the same as path
5252
isFile: () => boolean; // Is the file just a file?
5353
isDirectory: () => boolean; // Is the file a directory?
5454
};

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,10 +381,12 @@ The promise resolves with an object with the following properties:
381381

382382
```
383383
type StatResult = {
384+
path: // The same as filepath argument
384385
ctime: date; // The creation date of the file
385386
mtime: date; // The last modified date of the file
386387
size: string; // Size in bytes
387388
mode: number; // UNIX file mode
389+
originalFilepath: string; // ANDROID: In case of content uri this is the pointed file path, otherwise is the same as path
388390
isFile: () => boolean; // Is the file just a file?
389391
isDirectory: () => boolean; // Is the file a directory?
390392
};

0 commit comments

Comments
 (0)