Module

Node.Path

Package
purescript-node-path
Repository
purescript-node/purescript-node-path

#FilePath Source

type FilePath = String

Type for strings representing file paths.

#normalize Source

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 Source

concat :: Array FilePath -> FilePath

Concatenates multiple path segments together and normalizes the resulting path.

#resolve Source

resolve :: Array FilePath -> FilePath -> FilePath

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

#relative Source

relative :: FilePath -> FilePath -> FilePath

Solve the relative path from from to to.

#dirname Source

dirname :: FilePath -> FilePath

Return the directory name of a path.

#basename Source

basename :: FilePath -> FilePath

Return the last portion of a path.

#basenameWithoutExt Source

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 Source

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 Source

sep :: String

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

#delimiter Source

delimiter :: String

The platform-specific path delimiter, ; or :.

#parse Source

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

Parse a path into components.

#isAbsolute Source

isAbsolute :: String -> Boolean

Determines whether path is an absolute path

Modules
Node.Path