Hoogle Search
Within LTS Haskell 24.3 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
toFilePath :: ByteString -> IO FilePathrawfilepath Data.ByteString.RawFilePath Convert a ByteString to a FilePath. This function uses the file system encoding, and resulting FilePaths can be safely used with standard IO functions and will reference the correct path in the presence of arbitrary non-UTF-8 encoded paths. This function is in IO because the file system encoding can be changed. If the encoding can be assumed to be constant in your use case, you may invoke this function via unsafePerformIO.
-
Welcome to RawFilePath, a small part of the Haskell community's effort to purge String for the Greater Good. With this package, you can interact with the Unix system without the file path encoding issue or the String ↔ ByteString conversion overhead.
Rationale
Traditional String is notorious:- 24 bytes (three words) required for one character (the List constructor, the actual Char value, and the pointer to the next List constructor). 24x memory consumption.
- Heap fragmentation causing malloc/free overhead
- A lot of pointer chasing for reading, devastating the cache hit rate
- A lot of pointer chasing plus a lot of heap object allocation for manipulation (appending, slicing, etc.)
- Completely unnecessary but mandatory conversions and memory allocation when the data is sent to or received from the outside world
Usage
This is the top-level module that re-exports the sub-modules. Therefore, you canimport RawFilePath
to import all functions. For documentation, see: For process-related functions, see RawFilePath.Process for a brief introduction and an example code. -
rawfilepath RawFilePath A literal POSIX file path
-
rawfilepath RawFilePath.Directory A literal POSIX file path
-
rawfilepath RawFilePath.Process A literal POSIX file path
rzkFilePath :: RzkPosition -> Maybe FilePathrzk Language.Rzk.Free.Syntax No documentation available.
locationFilePath :: LocationInfo -> Maybe FilePathrzk Rzk.TypeCheck No documentation available.
-
spacecookie Network.Gopher.Util.Gophermap Wrapper around RawFilePath to indicate whether it is relative or absolute.
_iAMInstanceProfilePath :: IAMInstanceProfile -> Maybe (Val Text)stratosphere Stratosphere.Resources.IAMInstanceProfile No documentation available.
configFilePath :: Verbose -> ConfigSearchStrategy -> IO (Maybe FilePath)stylish-haskell Language.Haskell.Stylish.Config No documentation available.