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

Node fs.mkdirSync function | API Reference | Bun

Node fs.mkdirSync function | API Reference | BunBuildDocsReferenceGuidesBlogDiscord/node:fs/mkdirSyncFmkdirSync

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/node:fs/mkdirSyncFmkdirSync

function

fs.mkdirSyncfunction mkdirSync(path: PathLike,options: MakeDirectoryOptions & { recursive: true }): undefined | string;

Synchronously creates a directory. Returns undefined, or if recursive is true, the first directory path created. This is the synchronous version of mkdir.

See the POSIX mkdir(2) documentation for more details.

function mkdirSync(path: PathLike,options?: null | Mode | MakeDirectoryOptions & { recursive: false }): void;

Synchronous mkdir(2) - create a directory.

@param path

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

@param options

Either the file mode, or an object optionally specifying the file mode and whether parent folders should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to 0o777.

function mkdirSync(path: PathLike,options?: null | Mode | MakeDirectoryOptions): undefined | string;

Synchronous mkdir(2) - create a directory.

@param path

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

@param options

Either the file mode, or an object optionally specifying the file mode and whether parent folders should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to 0o777.

Referenced typestype PathLike = string | Buffer | URL

Valid types for path values in "fs".

interface MakeDirectoryOptionsmode?: Mode

A file mode. If a string is passed, it is parsed as an octal integer. If not specified

recursive?: boolean

Indicates whether parent folders should be created. If a folder was created, the path to the first created folder will be returned.

type Mode = number | string

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.mkdirSync function | API Reference | Bun,AI智能索引,全网链接索引,智能导航,网页索引

    API documentation for function node:fs.mkdirSync | Bun