- toString : String
Instances For
- Lake.instCheckExistsFilePath
- Lake.instCoeFilePathGitRepo
- Lake.instCoeTextFilePathFilePath
- Lake.instComputeHashFilePathIO
- Lake.instGetMTimeFilePath
- Lean.instFromJsonFilePath
- Lean.instToExprFilePath
- Lean.instToJsonFilePath
- System.FilePath.instDiv
- System.FilePath.instHDivString
- System.instCoeStringFilePath
- System.instHashableFilePath
- System.instInhabitedFilePath
- System.instReprFilePath
- System.instToStringFilePath
Equations
- System.instInhabitedFilePath = { default := { toString := default } }
Equations
- System.instHashableFilePath = { hash := System.hashFilePath✝ }
Equations
- System.instReprFilePath = { reprPrec := fun (p : Lake.FilePath) => Repr.addAppParen (Std.Format.text "FilePath.mk " ++ repr p.toString) }
Equations
- System.instToStringFilePath = { toString := fun (p : Lake.FilePath) => p.toString }
The character that separates directories. In the case where more than one character is possible, pathSeparator
is the 'ideal' one.
Equations
- System.FilePath.pathSeparator = if System.Platform.isWindows = true then '\' else '/'
The list of all possible separators.
Equations
- System.FilePath.pathSeparators = if System.Platform.isWindows = true then ['\', '/'] else ['/']
File extension character
Equations
Equations
- System.FilePath.exeExtension = if System.Platform.isWindows = true then "exe" else ""
Equations
- One or more equations did not get rendered due to their size.
Equations
- p.isAbsolute = (System.FilePath.pathSeparators.contains p.toString.front || System.Platform.isWindows && decide (p.toString.length > 1) && p.toString.iter.next.curr == ':')
Equations
- System.FilePath.instDiv = { div := System.FilePath.join }
Equations
- System.FilePath.instHDivString = { hDiv := fun (p : Lake.FilePath) (sub : String) => p.join { toString := sub } }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Extracts the stem (non-extension) part of p.fileName
.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Appends the extension ext
to a path p
.
ext
should not contain a leading .
, as this function adds one.
If ext
is the empty string, no .
is added.
Unlike System.FilePath.withExtension
, this does not remove any existing extension.
Replace the current extension in a path p
with ext
.
ext
should not contain a .
, as this function adds one.
If ext
is the empty string, no .
is added.
Equations
- p.components = p.normalize.toString.splitOn System.FilePath.pathSeparator.toString
Equations
- System.mkFilePath parts = { toString := System.FilePath.pathSeparator.toString.intercalate parts }
Equations
- System.instCoeStringFilePath = { coe := System.FilePath.mk }
@[reducible, inline]
Equations
The character that is used to separate the entries in the $PATH (or %PATH%) environment variable.
Equations
- System.SearchPath.separator = if System.Platform.isWindows = true then ';' else ':'
Equations
- System.SearchPath.parse s = List.map System.FilePath.mk (s.split fun (c : Char) => System.SearchPath.separator == c)
Equations
- path.toString = System.SearchPath.separator.toString.intercalate (List.map System.FilePath.toString path)