diff options
author | Alex Ameen <alex.ameen.tx@gmail.com> | 2023-01-22 13:45:02 -0600 |
---|---|---|
committer | Alex Ameen <alex.ameen.tx@gmail.com> | 2023-01-22 13:45:02 -0600 |
commit | 153ee460c59c67910476f7b1eadcabcd47206f2f (patch) | |
tree | 0d3cedeeec02f0b7b35a597d9bd4dbec09024101 /tests/lang/readDir | |
parent | 04de0dd0b4059c75115c780dae8ddc49a847b0e5 (diff) |
primop: add readFileType, optimize readDir
Allows checking directory entry type of a single file/directory.
This was added to optimize the use of `builtins.readDir` on some
filesystems and operating systems which cannot detect this information
using POSIX's `readdir`.
Previously `builtins.readDir` would eagerly use system calls to lookup
these filetypes using other interfaces; this change makes these
operations lazy in the attribute values for each file with application
of `builtins.readFileType`.
Diffstat (limited to 'tests/lang/readDir')
l--------- | tests/lang/readDir/ldir | 1 | ||||
l--------- | tests/lang/readDir/linked | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/tests/lang/readDir/ldir b/tests/lang/readDir/ldir new file mode 120000 index 000000000..191028156 --- /dev/null +++ b/tests/lang/readDir/ldir @@ -0,0 +1 @@ +foo
\ No newline at end of file diff --git a/tests/lang/readDir/linked b/tests/lang/readDir/linked new file mode 120000 index 000000000..c503f86a0 --- /dev/null +++ b/tests/lang/readDir/linked @@ -0,0 +1 @@ +foo/git-hates-directories
\ No newline at end of file |