| SMLDoc |
structure PathUtility : PATH_UTILITY =
struct
val trPath : string -> string
val isAbsolute : string -> bool
val makeAbsolute : {dir : string, path : string} -> string
val collectFilesInDir : (string -> bool) -> string -> string list
val splitDirFile : string -> {dir : string, file : string}
val joinDirFile : {dir : string, file : string} -> string
val splitBaseExt : string -> {base : string, ext : string option}
val joinBaseExt : {base : string, ext : string option} -> string
end
NOTE: This structure has nothing to do with the module path. It is the Path structure in "path" module that defines functions for that purpose.
Value detail |
---|
val isAbsolute : string -> bool
val makeAbsolute : {dir : string, path : string} -> string
When operating on cygwin environment, it is convenient to specify paths of source files in Unix style such as "/home/yamato/". If the argument path is in Unix style, this function converts it to Windows style path. But on Windows, OS.FileSys.fullPath can recognizes absolute path strings in Unix style, but OS.Path.isAbsolute/isRelative does not consider those paths as absolute path.
This function considers paths beginning with the "/" as absolute paths.
val collectFilesInDir : (string -> bool) -> string -> string list
val splitDirFile : string -> {dir : string, file : string}
"D:/foo/bar/hoge.txt" ==> {dir = "D:/foo/bar", file = "hoge.txt"} "D:/foo/bar\hoge.txt" ==> {dir = "D:/foo/bar/hoge", file = "hoge.txt"}
val joinDirFile : {dir : string, file : string} -> string
val splitBaseExt : string -> {base : string, ext : string option}
val joinBaseExt : {base : string, ext : string option} -> string
| SMLDoc: Documentation generator for SML |