type StatResult = {
name: ?string;
path: string;
size: string;
mode: number;
ctime: number; // <-- Invalid type as shown in below stat method
};
// ...
stat(filepath: string): Promise {
return RNFSManager.stat(normalizeFilePath(filepath)).then((result) => {
return {
'path': filepath,
'ctime': new Date(result.ctime * 1000), // <-- ctime is a Date type, not a number
...
};
});
}
This pull request fixes ctime type which is, in fact, a Date value, as evidenced in the
stat
implementation method:// ...
stat(filepath: string): Promise {
return RNFSManager.stat(normalizeFilePath(filepath)).then((result) => {
return {
'path': filepath,
'ctime': new Date(result.ctime * 1000), // <-- ctime is a Date type, not a number
...
};
});
}