Skip to content

Dir Native

Spice
import "std/io/dir_native";

Functions

readNextDirEntry

Spice
public f<bool> readNextDirEntry(byte* dirStream, String& name, int& entryType)

Read the next entry of an open directory stream

Parameters

Name Type Description
dirStream byte* Directory stream, as returned by opendir
name String& Receives the name of the entry
entryType int& Receives the type of the entry (DT_* value of 'struct dirent')

Returns: bool — True if an entry was read, false if the end of the stream was reached