-
Notifications
You must be signed in to change notification settings - Fork 16
/
deno_open.deno.txt
38 lines (29 loc) · 2.52 KB
/
deno_open.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
DENO_OPEN
VERSION ==> #Part of Deno
Blob
File
FileReader #Like DOM
Deno.open[Sync](UPATH[, OPTS]) #Open a FILE (instance of Deno.FsFile, not File)
->[>]FILE #Ref'd by the process
OPTS.read R#BOOL (def: true). Read access
OPTS.write W#BOOL (def: false). Write access
OPTS.append W#BOOL (def: false). Write access + append
OPTS.truncate #BOOL (def: false). Truncate file
#Requires OPTS.write true
OPTS.create #BOOL (def: false). On non-existing file, create it instead of throwing
#Requires OPTS.write|append true
OPTS.createNew #BOOL (def: false). On existing file, throw
#Requires OPTS.write|append true
OPTS.mode #NUM (def: 0o666 + umask). Does chmod if file is created
#Not on Windows
#Follows symlinks.
FILE.read[Sync]|write[Sync]
|seek[Sync](...) #Inherits READER[_SYNC]|WRITER[_SYNC]|SEEKER[_SYNC]
FILE.readable #RSTREAM
FILE.writable #WSTREAM
FILE.close()
FILE[Symbol.dispose]() #Inherits CLOSER
FILE.syncData[Sync]()->[>] #Flushes data to disk
FILE.sync[Sync]()->[>] #Flushes data + inode modification (timestamps, permissions, etc.) to disk