Repository navigation
Getting Files backed up by the filesystem #37340
Description
Activity
- changed the title
[-]Getting a Blobs backed up by the filesystem[/-][+]Getting Blobs backed up by the filesystem[/+]on Feb 13, 2021 - addedfeature requestIssues requesting new Node.js features.Issues requesting new Node.js features.fsIssues and PRs related to file-system APIs and the fs module.Issues and PRs related to file-system APIs and the fs module.
on Apr 13, 2021 - changed the title
[-]Getting Blobs backed up by the filesystem[/-][+]Getting Files backed up by the filesystem[/+]on Jul 7, 2021 browser has something new on drag and drop'ed files & folders
DataTransferItem.prototype.getAsFileSystemHandleto get things as a whatwg/fs handlei think we could have something like
getAsFileSystemHandleadded onto thefs.DirentSome proposals
import { readdir, getAsFileSystemHandle } from 'fs/promises' const handle = await getAsFileSystemHandle(path) const [dirent] = readdir(path, { withFileTypes: true }) const handle = await dirent.getAsFileSystemHandle() const file = await handle.getFile() const text = await file.text()
There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment.
For more information on how the project manages feature requests, please consult the feature request management document.
- addedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on Mar 6, 2023 There has been no activity on this feature request and it is being closed. If you feel closing this issue is not the right thing to do, please leave a comment.
For more information on how the project manages feature requests, please consult the feature request management document.
just for the sake of it:
fixed / closed by #45258
Is your feature request related to a problem? Please describe.
Blobs are merely pretty useless if they can only be constructed and held in memory.
A way to get blobs from the filesystem is necessary if we should see any use for them
I propose we add support for getting blob's from the filesystem before we start adding support for them in other places like the crypto, streams, fs and other place
After all writing a blob back to the filesystem can be as easy as creating a stream and piping it back to the filesystem or to a http request
Describe the solution you'd like
if the modified time is changed when you try to read the blob then it should throw a NotReadableError DOMException saying that it's out of sync. Likewise if size is changed.
Describe alternatives you've considered
fetch-blob has a "BlobDataItem" that is backed up by the filesystem...
assume this depends somewhat on #37338 and #39015 being resolved first