directory
directory copied to clipboard
Platform-independent library for basic file system operations
There is no equivalent to the popular `cp -a` available. It is similar to `copyFileWithMetadata`, but for entire directories. It is also very strict about including *all* metadata (even xargs)....
``` $ ln -s /invalid invalid $ ghci λ import System.Directory λ getModificationTime "invalid" *** Exception: invalid: getModificationTime:getFileStatus: does not exist (No such file or directory) ``` I think it...
There is a need for a more general file [`Metadata`](https://doc.rust-lang.org/std/fs/struct.Metadata.html) API with better awareness of symbolic links: * Lots of operations today traverse symbolic links, which is not always what...
I'm not entirely sure how we'd properly integrate this in the existing API, as (unlike the other Xdg directories) XDG_RUNTIME_DIR doesn't have a default value. On the other hand, it's...
## Motivation The next filepath release will add support for a new API, which fixes subtle encoding issues and improves cross platform code and memory residence. You can read about...
removeDirectoryRecursive and similar are supposed to avoid following symlinks. However, they all appear to have a TOCTOU flaw that exposes them to a race condition that could lead to deleting...
[Niall Douglas' "Racing the File System" at *CppCon*](https://youtu.be/uhRWMGBjlO8?t=621) actually outlines a deletion algorithm that works correctly on Windows. It does not require retries. The gist of it: - Deletion is...
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html It adds: *There is a single base directory relative to which user-specific state data should be written. This directory is defined by the environment variable` $XDG_STATE_HOME`.* It would be...
createDirectoryIfMissing True is a larger hammer than called for under many circumstances, but by being the only one in this module, it is in my experience very easy to reach...
Anything that imports System.Posix.Files and System.Directory and uses isSymbolicLink will start failing to build when updated to directory-1.2.6.2. Seems likely that most existing haskell code that uses System.Posix.Files.isSymbolicLink also uses...