Skip to content

Create an internal FileEntry type #75

Description

@cguedes

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)

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions