| DiskUtilitiesTryGetFilesInDirectory Method (DirectoryInfo, ListFileInfo, Boolean) |
Used to easily get all the files in a directory. This only gets the files, and does not include the folder structure.
Namespace:
DustProductions.Core
Assembly:
DustProductions.Core (in DustProductions.Core.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public static bool TryGetFilesInDirectory(
DirectoryInfo directoryWithFiles,
out List<FileInfo> filesInDirectory,
bool alsoGetFilesInSubDirectories = true
)
Parameters
- directoryWithFiles
- Type: System.IODirectoryInfo
The directory with the files to fetch - filesInDirectory
- Type: System.Collections.GenericListFileInfo
The list of files that will be populated when this succeeds - alsoGetFilesInSubDirectories (Optional)
- Type: SystemBoolean
Whether or not to recursively look in folders within folders
Return Value
Type:
BooleanTrue if the fetching succeeds, false otherwise
See Also