Dust::Platform
Thin wrapper around libc's stat/lstat.
Crystal's File::Info exposes neither inode/device nor st_blocks, both of
which dust needs (hard link detection and real disk usage), so every stat in
the program goes through here.
Constants
BLOCK_SIZE = 512_u64
All unix implementations report st_blocks in 512 byte units, no matter
what st_blksize says.
PREALLOC_BLOCKS = 65536_u64
Slack for filesystems that pre-allocate more space than strictly needed.
Instance methods
device_of(path : String, follow_links : Bool = false) : UInt64 | Nil
Sourceget_metadata(path : String, apparent : Bool = false, follow_links : Bool = false) : MetaData | Nil
Sourcekind_of(stat : LibC::Stat) : FileKind
Sourcelstat(path : String) : LibC::Stat | Nil
Sourcemetadata_from(stat : LibC::Stat | Nil, apparent : Bool = false) : MetaData | Nil
Same, from an already obtained stat (the walk stats every entry once).
stat(path : String) : LibC::Stat | Nil
Source