Skip to content

Dir Native

Spice
import "std/io/dir_native";

Functions

isNativeDir

Spice
public f<bool> isNativeDir(string path)

Checks if a directory is existing.

Parameters

Name Type Description
path string Path to check

Returns: bool — Existing or not

collectNativeDirEntries

Spice
public f<bool> collectNativeDirEntries(string dirPath, const String& prefix, bool recursive, Vector<String>& entries)

Append the entries of a directory to the given vector. Symbolic links to directories are not descended into.

Parameters

Name Type Description
dirPath string Path to the directory
prefix const String& Relative path of the directory, which is prepended to the entry names
recursive bool Descend into subdirectories or not
entries Vector<String>& Vector to append the entries to

Returns: bool — True if the directory could be opened, false if not