Skip to content

purescript-node/purescript-node-path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Module Documentation

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 :: [FilePath] -> FilePath

Concatenates multiple path segments together and normalizes the resulting path.

resolve

resolve :: [FilePath] -> FilePath -> 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 :.

About

Type declarations for Node's Path module

Resources

License

Stars

Watchers

Forks

Contributors