Hoogle Search
Within LTS Haskell 24.6 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
A library for FilePath manipulations, using Posix or Windows filepaths depending on the platform. Both System.FilePath.Posix and System.FilePath.Windows provide the same interface. Given the example FilePath: /directory/file.ext We can use the following functions to extract pieces.
- takeFileName gives "file.ext"
- takeDirectory gives "/directory"
- takeExtension gives ".ext"
- dropExtension gives "/directory/file"
- takeBaseName gives "file"
[replaceFileName path_to_main "Test" <.> ext | ext <- ["hs","lhs"] ]
Example 2: Download a file from url and save it to disk:do let file = makeValid url System.Directory.createDirectoryIfMissing True (takeDirectory file)
Example 3: Compile a Haskell file, putting the .hi file under interface:takeDirectory file </> "interface" </> (takeFileName file -<.> "hi")
References: [1] Naming Files, Paths and Namespaces (Microsoft MSDN) -
filepath System.FilePath No documentation available.
-
filepath System.FilePath.Posix No documentation available.
-
filepath System.FilePath.Windows No documentation available.
module System.Posix.ByteString.
FilePath Internal stuff: support for ByteString FilePaths
module System.Posix.PosixPath.
FilePath Internal stuff: support for ByteString FilePaths
-
hedgehog Hedgehog.Internal.Prelude File and directory names are values of type String, whose precise meaning is operating system dependent. Files can be opened, yielding a handle which can then be used to operate on the contents of that file.
module Distribution.Compat.
FilePath No documentation available.
-
ghc GHC.Prelude.Basic No documentation available.
-
No documentation available.