Skip to content

@jsvision/files / DirEntry

Interface: DirEntry

Defined in: files/src/fs/types.ts:14

A single directory entry: its basename plus the metadata the listing and info pane display. Names are stored raw and only sanitized when drawn, so it is safe to hand entries straight to the widgets.

Properties

broken?

optional broken?: boolean

Defined in: files/src/fs/types.ts:30

Set when a symlink's target cannot be resolved; kind still reads 'symlink'.


hidden

hidden: boolean

Defined in: files/src/fs/types.ts:28

Whether the entry is hidden — a dotfile on POSIX, the hidden attribute on Windows.


kind

kind: "file" | "dir" | "symlink"

Defined in: files/src/fs/types.ts:22

The entry's own type. A symlink keeps kind:'symlink' as its display tag, but its size/mtime reflect the resolved target, and the directory scan treats it as file- or directory-like by following the link.


mtime

mtime: Date

Defined in: files/src/fs/types.ts:26

Last-modified time (the target's time for a resolved symlink).


name

name: string

Defined in: files/src/fs/types.ts:16

The basename (e.g. 'readme.txt' or 'src'), stored raw; the draw boundary sanitizes it.


size

size: number

Defined in: files/src/fs/types.ts:24

File size in bytes (the target's size for a resolved symlink; 0 for a directory or broken link).