Module

Node.Path

#FilePath

type FilePath = String

Type for strings representing file paths.

#normalize

normalize :: FilePath -> FilePath

Normalize a string path, taking care of .. and ., duplicated slashes, etc. If the path contains a trailing slash it is preserved. On Windows backslashes are used.

#concat

concat :: Array FilePath -> FilePath

Concatenates multiple path segments together and normalizes the resulting path.

#resolve

resolve :: Array FilePath -> FilePath -> Effect FilePath

Resolves to to an absolute path ([from...], to).

#relative

relative :: FilePath -> FilePath -> FilePath

Solve the relative path from from to to.

#dirname

dirname :: FilePath -> FilePath

Return the directory name of a path.

#basename

basename :: FilePath -> FilePath

Return the last portion of a path.

#basenameWithoutExt

basenameWithoutExt :: FilePath -> FilePath -> FilePath

Return the last portion of a path, also dropping a specific file extension if it matches the end of the name.

#extname

extname :: FilePath -> FilePath

Return the extension of the path, from the last . to end of string in the last portion of the path. If there is no . in the last portion of the path or the first character of it is ., then it returns an empty string.

#sep

sep :: String

The platform-specific file separator. \\ or /.

#delimiter

delimiter :: String

The platform-specific path delimiter, ; or :.

#parse

parse :: String -> { base :: String, dir :: String, ext :: String, name :: String, root :: String }

Parse a path into components.

#isAbsolute

isAbsolute :: String -> Boolean

Determines whether path is an absolute path

Modules