Skip to content

File storage tree #1342

@jonocodes

Description

@jonocodes

This may be more of a question.

Since file are stored in a flat list, is there away to access them more like a hierarchical file system? If not, I could build a tree myself, but want to make sure this is not a bad idea. I guess I would have to listen for add/remove events, etc.

Here is an example use. Sometimes I want to look up the size of a directory. For example I may want to look up:
/foo/bar/baz
or
/kind/of/deep/structure/directory1

What I do now is a full scan of the entire remoteStore for any file path starting with '/foo/bar/baz/'. Then I fetch their file sizes and add them up.
This full scan can be expensive if there are thousands of files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions