vibe.d beta banner
get vibe.d
0.10.0

Asynchronous I/O that doesn’t get in your way, written in D

listDirectory - multiple declarations

Function listDirectory

Enumerates all files in the specified directory.

void listDirectory (
  GenericPath!(vibe.core.path.PosixPathFormat) path,
  DirectoryListMode mode,
  scope @safe bool delegate(FileInfo) del,
  scope nothrow @safe bool function(ref const(FileInfo)) directory_predicate = null
) @safe;

void listDirectory (
  string path,
  DirectoryListMode mode,
  scope @safe bool delegate(FileInfo) del
) @safe;

Note that unless an explicit mode is given, DirectoryMode.shallow is the default and only items directly contained in the specified folder will be returned.

Parameters

NameDescription
path Path to the (root) folder to list
mode Defines how files and sub directories are treated during the enumeration
del Callback to invoke for each directory entry
directory_predicate Optional predicate used to determine whether to descent into a sub directory (only available in the recursive DirectoryListMode modes)

Function listDirectory

void listDirectory (
  GenericPath!(vibe.core.path.PosixPathFormat) path,
  scope @safe bool delegate(FileInfo) del
) @safe;

void listDirectory (
  string path,
  scope @safe bool delegate(FileInfo) del
) @safe;

void listDirectory (
  GenericPath!(vibe.core.path.PosixPathFormat) path,
  DirectoryListMode mode,
  scope bool delegate(FileInfo) del,
  scope nothrow @safe bool function(ref const(FileInfo)) directory_predicate = null
);

void listDirectory (
  string path,
  DirectoryListMode mode,
  scope bool delegate(FileInfo) del
);

void listDirectory (
  GenericPath!(vibe.core.path.PosixPathFormat) path,
  scope bool delegate(FileInfo) del
);

void listDirectory (
  string path,
  scope bool delegate(FileInfo) del
);
Authors

Sönke Ludwig

Copyright

© 2012-2021 Sönke Ludwig

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.