Skip to content

DirEntry

An entry within a directory.

Yielded as fs.unix.DirEntry or fs.windows.DirEntry 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

name @ Str [get]

The final path component for the entry.

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

The file type.

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