温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/node/fs/open
点击访问原文链接

Node fs.open function | API Reference | Bun

Node fs.open function | API Reference | BunBuildDocsReferenceGuidesBlogDiscord/node:fs/openNopen

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/node:fs/openNopen

namespace

fs.open : " / \ | ? *`) are reserved under Windows as documented by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams). Functions based on `fs.open()` exhibit this behavior as well:`fs.writeFile()`, `fs.readFile()`, etc." data-algolia-static="false" data-algolia-merged="true" data-type="Namespace">function open(path: PathLike,flags?: OpenMode,mode?: null | Mode,callback: (err: null | ErrnoException, fd: number) => void): void;

Asynchronous file open. See the POSIX open(2) documentation for more details.

mode sets the file mode (permission and sticky bits), but only if the file was created. On Windows, only the write permission can be manipulated; see chmod.

The callback gets two arguments (err, fd).

Some characters ( : " / \ | ? *) are reserved under Windows as documented by Naming Files, Paths, and Namespaces. Under NTFS, if the filename contains a colon, Node.js will open a file system stream, as described by this MSDN page.

Functions based on fs.open() exhibit this behavior as well:fs.writeFile(), fs.readFile(), etc.

@param flags

See support of file system flags``.

function open(path: PathLike,flags?: OpenMode,callback: (err: null | ErrnoException, fd: number) => void): void;

Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be 0o666.

@param path

A path to a file. If a URL is provided, it must use the file: protocol.

@param flags

See support of file system flags``.

function open(path: PathLike,callback: (err: null | ErrnoException, fd: number) => void): void;

Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be 0o666.

@param path

A path to a file. If a URL is provided, it must use the file: protocol.

namespace open

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicense

Baked with ❤️ in San Francisco

We're hiring →

Node fs.open function | API Reference | Bun,AI智能索引,全网链接索引,智能导航,网页索引

    API documentation for namespace node:fs.open | Bun