-
Notifications
You must be signed in to change notification settings - Fork 64
/
Stats.hx
82 lines (69 loc) · 2.67 KB
/
Stats.hx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*
* Copyright (C)2014-2020 Haxe Foundation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
package js.node.fs;
/**
Objects returned from `Fs.stat`, `Fs.lstat` and `Fs.fstat` and their synchronous counterparts are of this type.
**/
extern class Stats {
var dev:Int;
var ino:Float;
var mode:Int;
var nlink:Int;
var uid:Int;
var gid:Int;
var rdev:Int;
var size:Float;
var blksize:Null<Int>;
var blocks:Null<Float>;
/**
"Access Time" - Time when file data last accessed.
Changed by the mknod(2), utimes(2), and read(2) system calls.
**/
var atime:Date;
/**
"Modified Time" - Time when file data last modified.
Changed by the mknod(2), utimes(2), and write(2) system calls.
**/
var mtime:Date;
/**
"Change Time" - Time when file status was last changed (inode data modification).
Changed by the chmod(2), chown(2), link(2), mknod(2), rename(2), unlink(2), utimes(2), read(2), and write(2) system calls.
**/
var ctime:Date;
/**
"Birth Time" - Time of file creation. Set once when the file is created.
On filesystems where birthtime is not available, this field may instead hold either the ctime or 1970-01-01T00:00Z (ie, unix epoch timestamp 0).
Note that this value may be greater than `atime` or `mtime` in this case. On Darwin and other FreeBSD variants,
also set if the `atime` is explicitly set to an earlier value than the current birthtime using the utimes(2) system call.
**/
var birthtime:Date;
function isFile():Bool;
function isDirectory():Bool;
function isBlockDevice():Bool;
function isCharacterDevice():Bool;
/**
Only valid with `Fs.lstat`.
**/
function isSymbolicLink():Bool;
function isFIFO():Bool;
function isSocket():Bool;
}