feat: add File.stat static method and test for directory stat
Add a new `File.stat(path)` static method that returns a `Stat` object with low-level file system metadata for both files and directories. Include a test file `stat_static_directory.wren` that validates the returned `Stat` object's type and field types (device, inode, mode, linkCount, user, group, specialDevice, size, blockSize, blockCount) against a known test directory.
This commit is contained in:
@@ -35,6 +35,13 @@ whatever encoding the file uses.
|
||||
|
||||
Returns the size in bytes of the contents of the file at `path`.
|
||||
|
||||
### File.**stat**(path)
|
||||
|
||||
"Stats" the file or directory at `path`. Returns a [Stat][] object describing
|
||||
the low-level details of the file system entry.
|
||||
|
||||
[stat]: stat.html
|
||||
|
||||
## Constructors
|
||||
|
||||
### File.**open**(path)
|
||||
|
||||
Reference in New Issue
Block a user