-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.whatwg-urlIssues and PRs related to the WHATWG URL implementation.Issues and PRs related to the WHATWG URL implementation.
Description
- Version: 7.6.0+
- Platform: all
- Subsystem: fs
Right now the FS APIs do support URLs - but only if they are passed as URL objects. This seems to go against the use of URLs in DOM APIs where methods tend to accept strings. E.g. fetch
only "accepts" URL objects because they happen to stringify to their .href
property.
Would it be acceptable to extend the current support for file URLs to "any string starting with file://
will be treated like a URL object"? This would remove the need for people to manually create import and then instantiate a URL object if they already have a valid file URL (e.g. via import.meta.url
).
pauldraper
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.whatwg-urlIssues and PRs related to the WHATWG URL implementation.Issues and PRs related to the WHATWG URL implementation.