( stat: NFS.BigIntStats, method = "stat" )
| 609 | "Unknown" |
| 610 | |
| 611 | const makeFileInfo = ( |
| 612 | stat: NFS.BigIntStats, |
| 613 | method = "stat" |
| 614 | ): Effect.Effect<FileSystem.File.Info, Error.PlatformError> => |
| 615 | Effect.try({ |
| 616 | try: (): FileSystem.File.Info => ({ |
| 617 | type: fileType(stat), |
| 618 | mtime: Option.fromNullishOr(stat.mtime), |
| 619 | atime: Option.fromNullishOr(stat.atime), |
| 620 | birthtime: Option.fromNullishOr(stat.birthtime), |
| 621 | dev: toUint64(stat.dev), |
| 622 | rdev: toUint64Option(stat.rdev), |
| 623 | ino: toUint64Option(stat.ino), |
| 624 | mode: bigintToNumber(stat.mode, "mode"), |
| 625 | nlink: toUint64Option(stat.nlink), |
| 626 | uid: bigintToNumberOption(stat.uid), |
| 627 | gid: bigintToNumberOption(stat.gid), |
| 628 | size: ByteSize.bytes(stat.size), |
| 629 | blksize: stat.blksize !== undefined ? Option.some(ByteSize.bytes(stat.blksize)) : Option.none(), |
| 630 | blocks: Option.fromNullishOr(stat.blocks) |
| 631 | }), |
| 632 | catch: handleBadArgument(method) |
| 633 | }) |
| 634 | const statFactory = (method: string, nodeStatFn: typeof NFS.stat) => { |
| 635 | const nodeStat = effectify( |
| 636 | nodeStatFn, |
no test coverage detected