mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 20:29:11 +00:00
feat(fs): add more unix-only fields to FileInfo (#3680)
This commit is contained in:
parent
5856d21a2e
commit
91757f63fd
5 changed files with 204 additions and 44 deletions
31
cli/js/lib.deno_runtime.d.ts
vendored
31
cli/js/lib.deno_runtime.d.ts
vendored
|
@ -732,12 +732,28 @@ declare namespace Deno {
|
|||
* be available on all platforms.
|
||||
*/
|
||||
created: number | null;
|
||||
/** The file or directory name. */
|
||||
name: string | null;
|
||||
/** ID of the device containing the file. Unix only. */
|
||||
dev: number | null;
|
||||
/** Inode number. Unix only. */
|
||||
ino: number | null;
|
||||
/** The underlying raw st_mode bits that contain the standard Unix permissions
|
||||
* for this file/directory. TODO Match behavior with Go on windows for mode.
|
||||
*/
|
||||
mode: number | null;
|
||||
/** The file or directory name. */
|
||||
name: string | null;
|
||||
/** Number of hard links pointing to this file. Unix only. */
|
||||
nlink: number | null;
|
||||
/** User ID of the owner of this file. Unix only. */
|
||||
uid: number | null;
|
||||
/** User ID of the owner of this file. Unix only. */
|
||||
gid: number | null;
|
||||
/** Device ID of this file. Unix only. */
|
||||
rdev: number | null;
|
||||
/** Blocksize for filesystem I/O. Unix only. */
|
||||
blksize: number | null;
|
||||
/** Number of blocks allocated to the file, in 512-byte units. Unix only. */
|
||||
blocks: number | null;
|
||||
/** Returns whether this is info for a regular file. This result is mutually
|
||||
* exclusive to `FileInfo.isDirectory` and `FileInfo.isSymlink`.
|
||||
*/
|
||||
|
@ -827,9 +843,16 @@ declare namespace Deno {
|
|||
modified: number;
|
||||
accessed: number;
|
||||
created: number;
|
||||
mode: number;
|
||||
hasMode: boolean;
|
||||
name: string | null;
|
||||
dev: number;
|
||||
ino: number;
|
||||
mode: number;
|
||||
nlink: number;
|
||||
uid: number;
|
||||
gid: number;
|
||||
rdev: number;
|
||||
blksize: number;
|
||||
blocks: number;
|
||||
}
|
||||
/** Queries the file system for information on the path provided. If the given
|
||||
* path is a symlink information about the symlink will be returned.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue