@@ -25,6 +25,30 @@ export
25
25
stat,
26
26
uperm
27
27
28
+ """
29
+ StatStruct
30
+
31
+ A struct which stores the information from `stat`.
32
+ The following fields of this struct is considered public API:
33
+
34
+ | Name | Type | Description |
35
+ |:--------|:--------------------------------|:-------------------------------------------------------------------|
36
+ | desc | `Union{String, Base.OS_HANDLE}` | The path or OS file descriptor |
37
+ | size | `Int64` | The size (in bytes) of the file |
38
+ | device | `UInt` | ID of the device that contains the file |
39
+ | inode | `UInt` | The inode number of the file |
40
+ | mode | `UInt` | The protection mode of the file |
41
+ | nlink | `Int` | The number of hard links to the file |
42
+ | uid | `UInt` | The user id of the owner of the file |
43
+ | gid | `UInt` | The group id of the file owner |
44
+ | rdev | `UInt` | If this file refers to a device, the ID of the device it refers to |
45
+ | blksize | `Int64` | The file-system preferred block size for the file |
46
+ | blocks | `Int64` | The number of 512-byte blocks allocated |
47
+ | mtime | `Float64` | Unix timestamp of when the file was last modified |
48
+ | ctime | `Float64` | Unix timestamp of when the file's metadata was changed |
49
+
50
+ See also: [`stat`](@ref)
51
+ """
28
52
struct StatStruct
29
53
desc :: Union{String, OS_HANDLE} # for show method, not included in equality or hash
30
54
device :: UInt
@@ -173,22 +197,21 @@ stat(fd::Integer) = stat(RawFD(fd))
173
197
Return a structure whose fields contain information about the file.
174
198
The fields of the structure are:
175
199
176
- | Name | Description |
177
- |:--------|:-------------------------------------------------------------------|
178
- | desc | The path or OS file descriptor |
179
- | size | The size (in bytes) of the file |
180
- | device | ID of the device that contains the file |
181
- | inode | The inode number of the file |
182
- | mode | The protection mode of the file |
183
- | nlink | The number of hard links to the file |
184
- | uid | The user id of the owner of the file |
185
- | gid | The group id of the file owner |
186
- | rdev | If this file refers to a device, the ID of the device it refers to |
187
- | blksize | The file-system preferred block size for the file |
188
- | blocks | The number of 512-byte blocks allocated |
189
- | mtime | Unix timestamp of when the file was last modified |
190
- | ctime | Unix timestamp of when the file's metadata was changed |
191
-
200
+ | Name | Type | Description |
201
+ |:--------|:--------------------------------|:-------------------------------------------------------------------|
202
+ | desc | `Union{String, Base.OS_HANDLE}` | The path or OS file descriptor |
203
+ | size | `Int64` | The size (in bytes) of the file |
204
+ | device | `UInt` | ID of the device that contains the file |
205
+ | inode | `UInt` | The inode number of the file |
206
+ | mode | `UInt` | The protection mode of the file |
207
+ | nlink | `Int` | The number of hard links to the file |
208
+ | uid | `UInt` | The user id of the owner of the file |
209
+ | gid | `UInt` | The group id of the file owner |
210
+ | rdev | `UInt` | If this file refers to a device, the ID of the device it refers to |
211
+ | blksize | `Int64` | The file-system preferred block size for the file |
212
+ | blocks | `Int64` | The number of 512-byte blocks allocated |
213
+ | mtime | `Float64` | Unix timestamp of when the file was last modified |
214
+ | ctime | `Float64` | Unix timestamp of when the file's metadata was changed |
192
215
"""
193
216
stat (path... ) = stat (joinpath (path... ))
194
217
0 commit comments