Skip to content

Commit 8f67ca7

Browse files
committed
Switch to socket based operations
1 parent bb1a146 commit 8f67ca7

File tree

13 files changed

+573
-202
lines changed

13 files changed

+573
-202
lines changed

src/lib/deno.d.ts

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
declare module Deno {
2+
export interface FileInfo {
3+
/** True if this is info for a regular file. Mutually exclusive to
4+
* `FileInfo.isDirectory` and `FileInfo.isSymlink`. */
5+
isFile: boolean;
6+
/** True if this is info for a regular directory. Mutually exclusive to
7+
* `FileInfo.isFile` and `FileInfo.isSymlink`. */
8+
isDirectory: boolean;
9+
/** True if this is info for a symlink. Mutually exclusive to
10+
* `FileInfo.isFile` and `FileInfo.isDirectory`. */
11+
isSymlink: boolean;
12+
/** The size of the file, in bytes. */
13+
size: number;
14+
/** The last modification time of the file. This corresponds to the `mtime`
15+
* field from `stat` on Linux/Mac OS and `ftLastWriteTime` on Windows. This
16+
* may not be available on all platforms. */
17+
mtime: Date | null;
18+
/** The last access time of the file. This corresponds to the `atime`
19+
* field from `stat` on Unix and `ftLastAccessTime` on Windows. This may not
20+
* be available on all platforms. */
21+
atime: Date | null;
22+
/** The creation time of the file. This corresponds to the `birthtime`
23+
* field from `stat` on Mac/BSD and `ftCreationTime` on Windows. This may
24+
* not be available on all platforms. */
25+
birthtime: Date | null;
26+
/** The last change time of the file. This corresponds to the `ctime`
27+
* field from `stat` on Mac/BSD and `ChangeTime` on Windows. This may
28+
* not be available on all platforms. */
29+
ctime: Date | null;
30+
/** ID of the device containing the file. */
31+
dev: number;
32+
/** Corresponds to the inode number on Unix systems. On Windows, this is
33+
* the file index number that is unique within a volume. This may not be
34+
* available on all platforms. */
35+
ino: number | null;
36+
/** The underlying raw `st_mode` bits that contain the standard Unix
37+
* permissions for this file/directory.
38+
*/
39+
mode: number | null;
40+
/** Number of hard links pointing to this file. */
41+
nlink: number | null;
42+
/** User ID of the owner of this file.
43+
*
44+
* _Linux/Mac OS only._ */
45+
uid: number | null;
46+
/** Group ID of the owner of this file.
47+
*
48+
* _Linux/Mac OS only._ */
49+
gid: number | null;
50+
/** Device ID of this file.
51+
*
52+
* _Linux/Mac OS only._ */
53+
rdev: number | null;
54+
/** Blocksize for filesystem I/O.
55+
*
56+
* _Linux/Mac OS only._ */
57+
blksize: number | null;
58+
/** Number of blocks allocated to the file, in 512-byte units. */
59+
blocks: number | null;
60+
/** True if this is info for a block device.
61+
*
62+
* _Linux/Mac OS only._ */
63+
isBlockDevice: boolean | null;
64+
/** True if this is info for a char device.
65+
*
66+
* _Linux/Mac OS only._ */
67+
isCharDevice: boolean | null;
68+
/** True if this is info for a fifo.
69+
*
70+
* _Linux/Mac OS only._ */
71+
isFifo: boolean | null;
72+
/** True if this is info for a socket.
73+
*
74+
* _Linux/Mac OS only._ */
75+
isSocket: boolean | null;
76+
}
77+
}

0 commit comments

Comments
 (0)