Skip to content

DirEntry

An entry within a directory.

Yielded by entries and Path.entries.

Operators

path / entry returns the derived Path for that directory entry:

let dir = Path ./src
for entry = dir.entries()
  echo (dir / entry)

Fields

ino @ Int

The inode number of the entry.

Unix only: reading it against a Windows target raises FieldError.

name @ Str

The final path component for the entry.

for entry = entries .
  echo "Name: $(entry.name)"
type @ FileType

The file type.

for entry = entries .
  if (entry.type == :DIR:)
    echo "Directory: $(entry.name)"