iterateDirectory

Enumerates all files in the specified directory.

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.

  1. int delegate(scope int delegate(ref FileInfo)) iterateDirectory(NativePath path, DirectoryListMode mode, bool function(ref const FileInfo) @(safe) nothrow directory_predicate)
    @safe
    int delegate
    (
    scope int delegate
    ()
    )
    iterateDirectory
    (,,
    bool function
    (
    ref const FileInfo
    )
    @safe nothrow
    directory_predicate = null
    )
  2. int delegate(scope int delegate(ref FileInfo)) iterateDirectory(string path, DirectoryListMode mode)

Parameters

path NativePath

Path to the (root) folder to list

mode DirectoryListMode

Defines how files and sub directories are treated during the enumeration

directory_predicate bool function
(
ref const FileInfo
)
@safe nothrow

Optional predicate used to determine whether to descent into a sub directory (only available in the recursive DirectoryListMode modes)

Meta