-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting file metadata #101
Comments
What metadata would be useful for you? And also, what use-cases do you have in mind? |
If you find bugs with the implementation, please file at https://crbug.com with the Blink>Storage>FileSystem component. Thank you for filing issues, it helps a lot! |
I wanted to monitor for file changes (#72) so looking at the modified value would be useful. But other timestamps such as created, opened and downloaded could be useful as well. |
For other metadata I would like to understand better what it would be useful for. Do you have any particular use cases in mind you would want to use that data for? |
Alright I've submitted it (1018945). I can't really think of a good use case for meta data. I initially thought it would be nice for a web based file browser, or a music library for instance. But I think I misunderstood how metadata works a bit. I think most of the metadata of music is stored in the file itself so this should already be accessible. So I'm not sure how high of a priority this should be. |
I have been thinking about it also. Long time ago i made a tool that would calculate/visualize what takes up most space in a directory with a pie/sun chart. that meant i had to loop over each file/directory and get all file sizes. Now i don't know what a |
At least in chrome creating a I'll leave this open to track investigating eventually exposing more metadata, although probably not high priority. |
Are there any plans to expose the |
Getting the last modified date from the files requires you to |
i second this. It's unclear what a File/Blob is under the hood. Sometimes it's a file references to some place on the disk, sometimes it's snapshot. Large files created with Somewhere i heard that in http2 a blob can potentially just be a references to a remote data stream without having to download the actual content until you actually need it. sry, was a bit of topic there. |
I agree we want a separate getMetaData or similer method. While in most cases calling getFile should be pretty efficient, having a separate method would be way clearer as being efficient. Also for directories we would need this anyway. |
...I suppose a getMetaData would be easier to garbage collect A metadata could just be handed over to the developer without something being stored in the BlobStore I can imagine how long the list at chrome://blob-internals would be if i just scanned a folder to gather size information to create something like a daisydisk app |
This issue has been ported to the new spec: whatwg/fs#12 |
Would it be possible to include some sort of way to get the metadata of a file? Currently in Chrome when calling
FileSystemFileHandle.getFile()
returns aFile
objects with itslastModified
value set to the current date and time. It would be nice to at least have this value set to the modified value of the actual file. But having access to other metadata values could be desirable.The text was updated successfully, but these errors were encountered: