Skip to content

doc: Clarify what <string> means in path option of fs.readFile, fs.readFileSync etc.  #36585

@CxRes

Description

@CxRes
  • Version: 14.15.3 x64
  • Platform: Windows 10 64-bit
  • Subsystem: fs

Affected URL(s):
https://nodejs.org/dist/latest-v14.x/docs/api/fs.html#fs_fs_readfile_path_options
https://nodejs.org/dist/latest-v14.x/docs/api/fs.html#fs_fs_readfilesync_path_options

Description

I am not sure if this a documentation issue or a bug. I get a ENOENT error when I use a url string as path for fs.readFile. However, if I convert the url string to a file path, I am able to read the file.

It needs to be clarified if path strings are exclusively file paths and not urls. If it can also be a url string (and I see no reason for not supporting them?) , then this is bug/feature request!

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to the documentations.fsIssues and PRs related to the fs subsystem / file system.questionIssues that look for answers.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions