mrdocs::files

Enums

Name

Description

FileType

The type of a file.

Functions

Name

Description

appendPath

createDirectory

Create a directory.

exists

Determine if a path exists

getFileName

Return the filename part of the path.

getFileText

Return the contents of a file as a string.

getFileType

Return the file type or an error

getParentDir

Return the parent directory.

getSourceFilename

Return the relevant suffix of a source file path.

isAbsolute

Return true if pathName is absolute.

isDirectory

Determine if a path is a directory.

isDirsy

Return true if pathName ends in a separator.

isLexicalDirectory

Determine lexically if a path is a directory.

isPosixStyle

Check if the path is posix style.

makeAbsolute

Return an absolute path from a possibly relative path.

makeDirsy

Append a trailing native separator if not already present.

makePosixStyle

Convert all backward slashes to forward slashes.

normalizeDir

Return a normalized directory.

normalizePath

Return a normalized path.

requireAbsolute

Return an error if pathName is not absolute.

requireDirectory

Return an error if the path is not a directory.

startsWith

Checks if the given path starts with the specified prefix.

withExtension

Return the filename with a new or different extension.

Created with MrDocs