Skip to content

win32

luau
local win32 = require("@std/path/win32")

win32.basename

Returns the last component of path, or nil if the path has no components.

luau
(path: Pathlike) -> string?

win32.dirname

Returns the directory portion of path as a string (everything except the last component).

luau
(path: Pathlike) -> string

win32.drive

Returns a Path representing just the drive root of path (e.g. C:\). Errors if path has no drive letter.

luau
(path: Pathlike) -> Path

win32.extname

Returns the file extension of path (including the leading dot), or "" if there is none.

luau
(path: Pathlike) -> string

win32.format

Converts path to its Windows string representation using backslash separators.

luau
(path: Pathlike) -> string

win32.isAbsolute

Returns true if path is absolute (drive-rooted or UNC).

luau
(path: Pathlike) -> boolean

win32.join

Joins one or more path segments into a single Path. Each segment after the first must be relative.

luau
(...: Pathlike) -> Path

win32.normalize

Returns a normalized form of path, resolving . and .. components and removing redundant separators.

luau
(path: Pathlike) -> Path

win32.parse

Parses path into a structured Path value.

luau
(path: Pathlike) -> Path

win32.pathmt

luau
pathinterface.PathInterface

win32.pathmt:__tostring

luau
() -> string

win32.relative

Returns the relative path from from to to. Both paths must have the same kind and drive.

luau
(from: Pathlike, to: Pathlike) -> Path

win32.resolve

Resolves a sequence of paths into an absolute Path, processing right-to-left and falling back to the current working directory.

luau
(...: Pathlike) -> Path