[Home] Module Microsoft.FSharp.Compatibility.OCaml.Filename


Common filename operations. This module is included to make it possible to cross-compile code with other ML compilers. See also [[System.IO.Path]]

Values

ValueDescription
val basename : string -> string
"dirname" and "basename" decompose a filename into a directory name and a filename, i.e. "concat (dirname s) (basename s) = s"
val check_suffix : string -> string -> bool
"check_suffix f s" returns true if filename "f" ends in suffix "s", e.g. check_suffix "abc.ml" ".ml" returns true.
val chop_extension : string -> string
"chop_extension f" removes the extension, if any, from the given filename.
val chop_suffix : string -> string -> string
Assuming "check_suffix f s" holds, "chop_suffix f s" returns the filename "f" with the suffix "s" removed.
val concat : string -> string -> string
"concat a b" returns System.IO.Path.Combine(a,b), i.e. the two names conjoined by the appropriate directory separator character for this architecture.
val current_dir_name : string
The name used for the current directory on this OS.
val dirname : string -> string
"dirname" and "basename" decompose a filename into a directory name and a filename, i.e. "concat (dirname s) (basename s) = s"
val has_extension : string -> bool
Return true if the filename has a "." extension
val is_implicit : string -> bool
Returns true if the path is relative to the current directory but does not begin with an explicit "." or ".."
val is_relative : string -> bool
Is the path is relative to the current directory or absolute.
val parent_dir_name : string
"parent_dir_name" returns the name for the directory above the current directory on this OS.
val quote : string -> string
"quote s" is designed for use to quote a filename when using it for a system command. It returns ("\'" ^ s ^ "\'").
val temp_file : string -> string -> string
"temp_file f s" returns a hitherto unused new file name. "f" and "s" are hints as to a suitable file name and suffix for the file.

See Also

Microsoft.FSharp.Compatibility.OCaml


Documentation for assembly FSharp.Compatibility, version 1.9.4.19, generated using F# version 1.9.4.19