-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathdeno_stat.deno.txt
51 lines (39 loc) · 2.58 KB
/
deno_stat.deno.txt
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
┏━━━━━━━━━━━━━━━┓
┃ DENO_STAT ┃
┗━━━━━━━━━━━━━━━┛
VERSION ==> #Part of Deno
FILE.stat[Sync]()->[>]FILE_INFO
Deno.[l]stat[Sync](UPATH)
->[>]FILE_INFO R#Follows symlinks unless "lstat"
FILE_INFO.ino #Inode NUM. null on Windows.
FILE_INFO.dev #Partition NUM that current file belongs to. Cross-OS
FILE_INFO.rdev #Partition NUM if current file is that partition. null on Windows
FILE_INFO.size #NUM (in bytes). Cross-OS
FILE_INFO.blocks #NUM (in blocks) allocated. null on Windows
FILE_INFO.blksize #NUM of bytes per block in current filesystem. null on Windows
FILE_INFO.mtime|atime|birthtime
|ctime #DATE. Cross-OS. Can be null for multiple reasons
FILE_INFO.uid|gid #NUM. null on Windows
FILE_INFO.nlink #NUM of hard links (in addition to self). null on Windows
FILE_INFO.mode !#Or'd NUM with permissions and file type
FILE_INFO.isFile|Directory|Symlink#BOOL. Mutually exclusive
FILE_INFO.isBlockDevice
|CharDevice|Fifo|Socket #BOOL. Mutually exclusive. null on Windows
@std/fs/unstable-[l]stat !#
[l]stat[Sync](UPATH) #Same but if not Deno (detecting using navigator.userAgent), uses `node:fs` instead
->[>]FILE_INFO #Still always returns Deno-style FILE_INFO, or throw Deno-style ERROR
Deno.utime[Sync](UPATH,
DATE[_NUM], DATE2[_NUM])->[>] W#Change atime|mtime. DATE_NUM is in secs.
fs/unstable-utime !#
utime[Sync](...) W#Same as Deno.utime[Sync]() except it uses Node fs.utime[Sync]() if using Node instead
Deno.chmod[Sync](UPATH, NUM)->[>]W#Change file permission. Throws on Windows
fs/unstable-chmod !#
chmod[Sync](...) #Same as Deno.chmod[Sync]() except it uses Node fs.chmod[Sync]() if using Node instead
Deno.chown[Sync]
(UPATH, UID, GID)->[>] W#Change UID|GID NUM or null (no change). Throws on Windows
--unstable-fs !#
Deno.umask([NUM])->NUM2 #Set process umask to NUM (def: same).
#Return umask before being set.
#Throws on Windows
fs/unstable-umask !#
umask[Sync](...) #Same as Deno.umask[Sync]() except it uses Node fs.umask[Sync]() if using Node instead