itinance / react-native-fs

Native filesystem access for react-native
MIT License
4.89k stars 954 forks source link

fix: StatResult ctime type #1207

Open n-kulic opened 6 months ago

n-kulic commented 6 months ago

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 ... }; }); }