UNPKG

@u4/adbkit

Version:

A Typescript client for the Android Debug Bridge.

69 lines 1.76 kB
import Stats from './stats.js'; const b1k = BigInt(1000); export default class Stats64 { isFile() { return !!(Number(this.mode) & Stats.S_IFREG); } isDirectory() { return !!(Number(this.mode) & Stats.S_IFDIR); } isBlockDevice() { return !!(Number(this.mode) & Stats.S_IFBLK); } isCharacterDevice() { return !!(Number(this.mode) & Stats.S_IFCHR); } isSymbolicLink() { return !!(Number(this.mode) & Stats.S_IFLNK); } isFIFO() { return !!(Number(this.mode) & Stats.S_IFIFO); } isSocket() { return !!(Number(this.mode) & Stats.S_IFSOCK); } get atimeMs() { return this.atimeNs / b1k; } get mtimeMs() { return this.mtimeNs / b1k; } get ctimeMs() { return this.ctimeNs / b1k; } get birthtimeMs() { return this.birthtimeMs / b1k; } get atime() { return new Date(Number(this.atimeMs)); } get mtime() { return new Date(Number(this.mtimeMs)); } get ctime() { return new Date(Number(this.ctimeMs)); } get birthtimeNs() { return this.ctimeNs; } get birthtime() { return this.ctime; } constructor(error, dev, ino, mode, nlink, uid, gid, size, atimeNs, mtimeNs, ctimeNs) { this.error = error; this.dev = dev; this.ino = ino; this.mode = mode; this.nlink = nlink; this.uid = uid; this.gid = gid; this.size = size; this.atimeNs = atimeNs; this.mtimeNs = mtimeNs; this.ctimeNs = ctimeNs; this.rdev = BigInt(0); this.blksize = BigInt(0); this.blocks = BigInt(0); } } //# sourceMappingURL=stats64.js.map