-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements to pathType, pathIsDirectory and pathIsRegularFile #224834
Commits on Apr 5, 2023
-
lib.sources.pathType and co.: Move to lib.filesystem
These functions only work with the filesystem, they don't import anything as sources
Configuration menu - View commit details
-
Copy full SHA for c701a4d - Browse repository at this point
Copy the full SHA c701a4dView commit details
Commits on May 22, 2023
-
lib.filesystem.pathType and co.: Add tests
Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
Configuration menu - View commit details
-
Copy full SHA for a1dedc9 - Browse repository at this point
Copy the full SHA a1dedc9View commit details -
lib.filesystem: Minor refactor
Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
Configuration menu - View commit details
-
Copy full SHA for 5346636 - Browse repository at this point
Copy the full SHA 5346636View commit details -
lib.filesystem.pathType: Fix for filesystem root argument
Previously this function couldn't handle / being passed, it would throw an error: error: attribute '' missing at nixpkgs/lib/filesystem.nix:24:20: 23| */ 24| pathType = path: (readDir (dirOf path)).${baseNameOf path}; | ^ 25| Consequently this also fixes the lib.filesystem.{pathIsDirectory,pathIsRegularFile} functions.
Configuration menu - View commit details
-
Copy full SHA for bb6eab0 - Browse repository at this point
Copy the full SHA bb6eab0View commit details -
lib.filesystem.pathType: Improve error for non-existent paths
Previously it would fail with error: attribute 'nonexistent' missing at nixpkgs/lib/filesystem.nix:29:10: 28| if dirOf path == path then "directory" 29| else (readDir (dirOf path)).${baseNameOf path}; | ^ 30|
Configuration menu - View commit details
-
Copy full SHA for d064d97 - Browse repository at this point
Copy the full SHA d064d97View commit details -
Configuration menu - View commit details
-
Copy full SHA for 84a3d63 - Browse repository at this point
Copy the full SHA 84a3d63View commit details -
lib.filesystem.pathType: Use new builtins.readFileType if available
Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
Configuration menu - View commit details
-
Copy full SHA for fcaa2b1 - Browse repository at this point
Copy the full SHA fcaa2b1View commit details -
lib/filesystem.nix: Update top comment
Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
Configuration menu - View commit details
-
Copy full SHA for 378bf1a - Browse repository at this point
Copy the full SHA 378bf1aView commit details