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

Node os.userInfo function | API Reference | Bun

Node os.userInfo function | API Reference | BunBuildDocsReferenceGuidesBlogDiscord/node:os/userInfoFuserInfo

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/node:os/userInfoFuserInfo

function

os.userInfofunction userInfo(options?: UserInfoOptionsWithStringEncoding): UserInfostring>;

Returns information about the currently effective user. On POSIX platforms, this is typically a subset of the password file. The returned object includes the username, uid, gid, shell, and homedir. On Windows, the uid and gid fields are -1, and shell is null.

The value of homedir returned by os.userInfo() is provided by the operating system. This differs from the result of os.homedir(), which queries environment variables for the home directory before falling back to the operating system response.

Throws a SystemError if a user has no username or homedir.

function userInfo(options: UserInfoOptionsWithBufferEncoding): UserInfoNonSharedBuffer>;

Returns information about the currently effective user. On POSIX platforms, this is typically a subset of the password file. The returned object includes the username, uid, gid, shell, and homedir. On Windows, the uid and gid fields are -1, and shell is null.

The value of homedir returned by os.userInfo() is provided by the operating system. This differs from the result of os.homedir(), which queries environment variables for the home directory before falling back to the operating system response.

Throws a SystemError if a user has no username or homedir.

function userInfo(options: UserInfoOptions): UserInfostring | NonSharedBuffer>;

Returns information about the currently effective user. On POSIX platforms, this is typically a subset of the password file. The returned object includes the username, uid, gid, shell, and homedir. On Windows, the uid and gid fields are -1, and shell is null.

The value of homedir returned by os.userInfo() is provided by the operating system. This differs from the result of os.homedir(), which queries environment variables for the home directory before falling back to the operating system response.

Throws a SystemError if a user has no username or homedir.

Referenced typesinterface UserInfoOptionsWithStringEncodingencoding?: BufferEncodinginterface UserInfoT>gid: numberhomedir: Tshell: null | Tuid: numberusername: Tinterface UserInfoOptionsWithBufferEncodingencoding: 'buffer'interface UserInfoOptionsencoding?: BufferEncoding | 'buffer'

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

    API documentation for function node:os.userInfo | Bun