The code is already using @tauri-apps/api/fs.FileEntry in 7 files (filesystem, openFilesState, multiple UI components).
The existing interface of FileEntry also lacks:
- separation (types) between file and directory
- we need to check if children is not undefined
- extension name for files
- additional metadata about the file
I propose that we create an internal type for this and make the filesystem.ts the integration point with Tauri's API.
Inspiration for filesystem types and names:
I think we won't get much with that change (we don't have extname available for a file). This code (i.e. checking for the extension) would be simplified with the creation of a custom type for FileEntry (derived from Tauri's FileEntry).
Originally posted by @cguedes in #62 (comment)
The code is already using
@tauri-apps/api/fs.FileEntryin 7 files (filesystem, openFilesState, multiple UI components).The existing interface of FileEntry also lacks:
I propose that we create an internal type for this and make the
filesystem.tsthe integration point with Tauri's API.Inspiration for filesystem types and names:
Originally posted by @cguedes in #62 (comment)