-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement ishidden on ZFS for BSD #12
Comments
I should consider implementing on OpenBSD and NetBSD, not just FreeBSD. However, Julia itself only officially supports FreeBSD, so we will see. |
BSD-related OS's (i.e., FreeBSD and macOS) can have the st_flags check applied to them (as I implemented this for macOS), so this function was moved out into a separate branch. ZFS function stubs were also created (with errors in case people try to use them at this stage in development) so that I can (hopefully soon) start implementing them. Addresses #1, #3, #12, #13
Apparently you can get ZFS on macOS: https://github.com/openzfsonosx/zfs Addresses #1, #12, #13
Interestingly, using the |
Some more testing: we run the following on FreeBSD: #include <stdio.h>
#include <sys/stat.h>
int main() {
char *fd = "/mnt/.zfs";
struct stat statbuf;
stat(fd, &statbuf);
unsigned int isinvisible = statbuf.st_flags & ((unsigned int) 32768); /* 0x00008000 */
printf("%u\n", isinvisible);
return 0;
} And this returns: $ cc test.c && ./a.out
0 So perhaps the |
After some further testing, I believe the
Hence, it does seem that out using HiddenFiles
function HiddenFiles._isinvisible(fs::Vector{String}; show_true::Bool = true)
for f in fs
i = HiddenFiles._isinvisible(f)
show_true && i && println(f)
end
end
function main(root_path::AbstractString)
for (root, dirs, files) in walkdir(root_path, follow_symlinks=true, onerror=println)
try
_isinvisible(joinpath.(root, files))
catch
continue
end
end
end
main("/") However, the Further testing should check if this flag is being set on Linux. Perhaps this check should be a global UNIX thing? This comment pertains to #3. |
Considering how long it has taken me to get literally nowhere regarding this implementation, I think I would like to save this feature for a different version, in the interest of getting a useable package registered. |
See also: #3, #13.
The text was updated successfully, but these errors were encountered: