-
Notifications
You must be signed in to change notification settings - Fork 16
/
deno_ensure.deno.txt
22 lines (16 loc) · 1.8 KB
/
deno_ensure.deno.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
DENO_ENSURE
VERSION ==> #Part of Deno
Deno.create(UPATH)->>FILE
Deno.createSync(...) WR#Creates file. If already exists, truncates it
std/fs/ensure_file.ts
ensureFile(UPATH)->> WR#If UPATH does not exist, creates it empty
ensureFileSync(...) #Throws if UPATH exists but is not a regular file, or if parent is not a DIR
#Throws if new file's parent is not a DIR
#Creates parent DIRs
std/fs/ensure_dir.ts
ensureDir(DIR_UPATH)->> WR#If DIR does not exist, creates it empty
ensureDirSync(...) #Throws if UPATH exists but is not a DIR
#Throws if new file's parent is not a DIR
#Creates parent DIRs