Consider storing stat results in a struct rather than indexing the st_flags attribute directly.
Something like this (untested):
struct BSDStatStruct
st_dev::UInt64
st_mode::UInt64
st_nlink::UInt64
st_uid::UInt64
st_gid::UInt64
st_rdev::UInt64
st_ino::UInt64
st_size::UInt64
st_blksize::UInt64
st_blocks::UInt64
st_flags::UInt64
st_gen::UInt64
st_atime::Int
st_mtim::Int
st_ctim::Int
st_birthtim::Int
end
function _st_flags(f::AbstractString)
stat_t = Ref{BSDStatStruct}()
ccall(:jl_lstat, Cvoid, (Cstring, Ref{BSDStatStruct}), f, stat_t)
return stat_t.x.st_flags
end
Consider storing
statresults in a struct rather than indexing thest_flagsattribute directly.Something like this (untested):