public static class QuickIODirectory
Provides static methods to access folders. For example creating, deleting and retrieving content and security information such as the owner.
AddAttribute(QuickIODirectoryInfo info, FileAttributes attribute)
Adds the specified attribute to file or directory
public static Boolean AddAttribute(QuickIODirectoryInfo info, FileAttributes attribute)
Parameters
info
QuickIODirectoryInfoA directory or file.
attribute
FileAttributesAttribute to add
Returns
true if added. false if already exists in attributes
AddAttribute(QuickIOPathInfo info, FileAttributes attribute)
Adds the specified attribute to file or directory
public static Boolean AddAttribute(QuickIOPathInfo info, FileAttributes attribute)
Parameters
info
QuickIOPathInfoA directory or file.
attribute
FileAttributesAttribute to add
Returns
true if added. false if already exists in attributes
AddAttribute(String path, FileAttributes attribute)
Adds the specified attribute to file or directory
public static Boolean AddAttribute(String path, FileAttributes attribute)
Parameters
path
StringA directory or file.
attribute
FileAttributesAttribute to add
Returns
true if added. false if already exists in attributes
Copy(QuickIODirectoryInfo source, QuickIOPathInfo target, Boolean overwrite)
Copies a directory and all contents
public static void Copy(QuickIODirectoryInfo source, QuickIOPathInfo target, Boolean overwrite)
Parameters
source
QuickIODirectoryInfoSource directory
target
QuickIOPathInfoTarget directory
overwrite
Booleantrue to overwrite existing files
Copy(String source, String target, Boolean overwrite)
Copies a directory and all contents
public static void Copy(String source, String target, Boolean overwrite)
Parameters
source
StringSource directory
target
StringTarget directory
overwrite
Booleantrue to overwrite existing files
Create(QuickIOPathInfo pathInfo, Boolean recursive)
Creates a new directory. If recursive is false, the parent directory must exist.
public static void Create(QuickIOPathInfo pathInfo, Boolean recursive)
Parameters
pathInfo
QuickIOPathInfoThe directory.
recursive
BooleanIf recursive is false, the parent directory must exist.
Exceptions
PathAlreadyExistsException
The specified path already exists.
PathNotFoundException
One or more intermediate directories do not exist; this function will only create the final directory in the path.
Remarks
http://msdn.microsoft.com/en-us/library/54a0at6s(v=vs.110).aspx
Example
Shows how to handle sample exception if parent directory does not exist. public static void CreateWithStringPath_Example() { QuickIOPathInfo pathInfo = new QuickIOPathInfo( @"C:\temp\QuickIOTest\sub\folder\tree" );
try
{
QuickIODirectory.Create( pathInfo, recursive: false );
}
catch ( PathNotFoundException pathNotFoundException )
{
// Parent directory does not exist.
}
}
Create(String path, Boolean recursive)
Creates a new directory. If recursive is false, the parent directory must exist.
public static void Create(String path, Boolean recursive)
Parameters
path
StringThe path to the directory.
recursive
BooleanIf recursive is false, the parent directory must exist.
Exceptions
PathAlreadyExistsException
The specified path already exists.
PathNotFoundException
One or more intermediate directories do not exist; this function will only create the final directory in the path.
Remarks
http://msdn.microsoft.com/en-us/library/54a0at6s(v=vs.110).aspx
Example
Shows how to handle sample exception if parent directory does not exist. public static void CreateWithStringPath_Example() { try { QuickIODirectory.Create( @"C:\temp\QuickIOTest\sub\folder\tree", recursive: false ); } catch ( PathNotFoundException pathNotFoundException ) { // Parent directory does not exist. } }
Delete(QuickIOPathInfo info, Boolean recursive)
Deletes the specified directory and, if indicated, any subdirectories and files in the directory.
public static void Delete(QuickIOPathInfo info, Boolean recursive)
Parameters
info
QuickIOPathInfoThe name of the directory to remove.
recursive
Booleantrue to remove directories, subdirectories, and files in path; otherwise, false.
Exceptions
PathNotFoundException
One or more intermediate directories do not exist; this function will only create the final directory in the path.
DirectoryNotEmptyException
The directory is not empty.
Remarks
http://msdn.microsoft.com/en-us/library/fxeahc5f(v=vs.110).aspx
Example
Shows how to handle sample exception if directory is not empty public static void CreateWithStringPath_Example() { QuickIOPathInfo pathInfo = new QuickIOPathInfo( @"C:\temp\QuickIOTest\sub\folder\tree" );
try
{
QuickIODirectory.Delete( pathInfo, recursive: false );
}
catch ( DirectoryNotEmptyException directoryNotEmptyException )
{
// Directoy is not empty
}
}
Delete(String path, Boolean recursive)
Deletes the specified directory and, if indicated, any subdirectories and files in the directory.
public static void Delete(String path, Boolean recursive)
Parameters
path
StringThe name of the directory to remove.
recursive
Booleantrue to remove directories, subdirectories, and files in path; otherwise, false.
Exceptions
PathNotFoundException
One or more intermediate directories do not exist; this function will only create the final directory in the path.
DirectoryNotEmptyException
The directory is not empty.
Remarks
http://msdn.microsoft.com/en-us/library/fxeahc5f(v=vs.110).aspx
Example
Shows how to handle sample exception if directory is not empty public static void CreateWithStringPath_Example() { try { QuickIODirectory.Delete( @"C:\temp\QuickIOTest\sub\folder\tree", recursive: false ); } catch ( DirectoryNotEmptyException directoryNotEmptyException ) { // Directoy is not empty } }
EnumerateDirectories(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of directories in a specified path.
public static IEnumerable<QuickIODirectoryInfo> EnumerateDirectories(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Parameters
directoryInfo
QuickIODirectoryInfoThe directory to search.
searchOption
SearchOptionSearchOption
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of the full names (including paths) for the directories in the directory specified by path.
Remarks
http://msdn.microsoft.com/en-us/library/dd383304(v=vs.110).aspx
EnumerateDirectories(QuickIOPathInfo info, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of directories names in a specified path.
public static IEnumerable<QuickIODirectoryInfo> EnumerateDirectories(QuickIOPathInfo info, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Parameters
info
QuickIOPathInfoThe directory to search.
searchOption
SearchOptionSearchOption
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of the full names (including paths) for the directories in the directory specified by path.
Remarks
http://msdn.microsoft.com/en-us/library/dd383304(v=vs.110).aspx
EnumerateDirectories(String path, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of directories in a specified path.
public static IEnumerable<QuickIODirectoryInfo> EnumerateDirectories(String path, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Parameters
path
StringThe directory to search.
searchOption
SearchOptionSearchOption
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of the full names (including paths) for the directories in the directory specified by path.
Remarks
http://msdn.microsoft.com/en-us/library/dd383304(v=vs.110).aspx
Example
// Get subfolders
IEnumerable>QuickIODirectoryInfo< allSubFolders = QuickIODirectory.EnumerateDirectories( @"C:\temp\QuickIO", SearchOption.AllDirectories );
foreach ( QuickIODirectoryInfo directoryInfo in allSubFolders )
{
Console.WriteLine( "Directory found: {0} Readonly: {1}", directoryInfo.FullName, directoryInfo.IsReadOnly );
}
EnumerateDirectoriesAsync(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of directories in a specified path in a seperate task created by the default TaskScheduler in async context.
public static Task<IEnumerable<String>> EnumerateDirectoriesAsync(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Parameters
directoryInfo
QuickIODirectoryInfoThe directory to search.
searchOption
SearchOptionSearchOption
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of the full names (including paths) for the directories in the directory specified by path.
Remarks
parallel file system browsing on the same hard disk (HDD/SSD) will decrease performance. Use this only on stripped RAIDs or with network shares.
EnumerateDirectoriesAsync(QuickIOPathInfo info, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of directories names in a specified path in a seperate task created by the default TaskScheduler.
public static Task<IEnumerable<String>> EnumerateDirectoriesAsync(QuickIOPathInfo info, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Parameters
info
QuickIOPathInfoThe directory to search.
searchOption
SearchOptionSearchOption
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of the full names (including paths) for the directories in the directory specified by path.
Remarks
parallel file system browsing on the same hard disk (HDD/SSD) will decrease performance. Use this only on stripped RAIDs or with network shares.
EnumerateDirectoriesAsync(String path, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of directories in a specified path in a seperate task created by the default TaskScheduler.
public static Task<IEnumerable<String>> EnumerateDirectoriesAsync(String path, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Parameters
path
StringThe directory to search.
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
searchOption
SearchOptionSearchOption
Returns
An enumerable collection of the full names (including paths) for the directories in the directory specified by path.
Remarks
parallel file system browsing on the same hard disk (HDD/SSD) will decrease performance. Use this only on stripped RAIDs or with network shares.
EnumerateDirectoryPaths(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of directory names in a specified path.
public static IEnumerable<String> EnumerateDirectoryPaths(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Parameters
directoryInfo
QuickIODirectoryInfoThe directory to search.
searchOption
SearchOptionSearchOption
pathFormatReturn
QuickIOPathTypeSpecifies the type of path to return.
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of the full names (including paths) for the directories in the directory specified by path.
Remarks
http://msdn.microsoft.com/en-us/library/dd383304(v=vs.110).aspx
EnumerateDirectoryPaths(QuickIOPathInfo info, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of directory names in a specified path.
public static IEnumerable<String> EnumerateDirectoryPaths(QuickIOPathInfo info, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Parameters
info
QuickIOPathInfoThe directory to search.
searchOption
SearchOptionSearchOption
pathFormatReturn
QuickIOPathTypeSpecifies the type of path to return.
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of the full names (including paths) for the directories in the directory specified by path.
Remarks
http://msdn.microsoft.com/en-us/library/dd383304(v=vs.110).aspx
EnumerateDirectoryPaths(String path, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of directory names in a specified path.
public static IEnumerable<String> EnumerateDirectoryPaths(String path, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Parameters
path
StringThe directory to search.
searchOption
SearchOptionSearchOption
pathFormatReturn
QuickIOPathTypeSpecifies the type of path to return.
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of the full names (including paths) for the directories in the directory specified by path.
Remarks
http://msdn.microsoft.com/en-us/library/dd383304(v=vs.110).aspx
EnumerateDirectoryPathsAsync(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of directory names in a specified path in a seperate task created by the default TaskScheduler.
public static Task<IEnumerable<String>> EnumerateDirectoryPathsAsync(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Parameters
directoryInfo
QuickIODirectoryInfoThe directory to search.
searchOption
SearchOptionSearchOption
pathFormatReturn
QuickIOPathTypeSpecifies the type of path to return.
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of the full names (including paths) for the directories in the directory specified by path.
EnumerateDirectoryPathsAsync(QuickIOPathInfo info, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of directory names in a specified path in a seperate task created by the default TaskScheduler.
public static Task<IEnumerable<String>> EnumerateDirectoryPathsAsync(QuickIOPathInfo info, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Parameters
info
QuickIOPathInfoThe directory to search.
searchOption
SearchOptionSearchOption
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
pathFormatReturn
QuickIOPathTypeSpecifies the type of path to return.
Returns
An enumerable collection of the full names (including paths) for the directories in the directory specified by path.
EnumerateDirectoryPathsAsync(String path, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of directory names in a specified path in async context.
public static Task<IEnumerable<String>> EnumerateDirectoryPathsAsync(String path, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Parameters
path
StringThe directory to search.
searchOption
SearchOptionSearchOption
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
pathFormatReturn
QuickIOPathTypeSpecifies the type of path to return.
Returns
An enumerable collection of the full names (including paths) for the directories in the directory specified by path.
EnumerateFilePaths(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of file names in a specified path.
public static IEnumerable<String> EnumerateFilePaths(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Parameters
directoryInfo
QuickIODirectoryInfoThe directory to search.
searchOption
SearchOptionSearchOption
pathFormatReturn
QuickIOPathTypeSpecifies the type of path to return.
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of the full names (including paths) for the files in the directory specified by path.
Remarks
http://msdn.microsoft.com/en-us/library/dd383458(v=vs.110).aspx
EnumerateFilePaths(QuickIOPathInfo info, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of file names in a specified path.
public static IEnumerable<String> EnumerateFilePaths(QuickIOPathInfo info, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Parameters
info
QuickIOPathInfoThe directory to search.
searchOption
SearchOptionSearchOption
pathFormatReturn
QuickIOPathTypeSpecifies the type of path to return.
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of the full names (including paths) for the files in the directory specified by path.
Remarks
http://msdn.microsoft.com/en-us/library/dd383458(v=vs.110).aspx
EnumerateFilePaths(String path, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of file names in a specified path.
public static IEnumerable<String> EnumerateFilePaths(String path, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Parameters
path
StringThe directory to search.
searchOption
SearchOptionSearchOption
pathFormatReturn
QuickIOPathTypeSpecifies the type of path to return.
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of the full names (including paths) for the files in the directory specified by path.
Remarks
http://msdn.microsoft.com/en-us/library/dd383458(v=vs.110).aspx
EnumerateFilePathsAsync(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of file names in a specified path in a seperate task created by the default TaskScheduler.
public static Task<IEnumerable<String>> EnumerateFilePathsAsync(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Parameters
directoryInfo
QuickIODirectoryInfoThe directory to search.
searchOption
SearchOptionSearchOption
pathFormatReturn
QuickIOPathTypeSpecifies the type of path to return.
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of the full names (including paths) for the files in the directory specified by path.
Remarks
parallel file system browsing on the same hard disk (HDD/SSD) will decrease performance. Use this only on stripped RAIDs or with network shares.
EnumerateFilePathsAsync(QuickIOPathInfo info, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of file names in a specified path in a seperate task created by the default TaskScheduler.
public static Task<IEnumerable<String>> EnumerateFilePathsAsync(QuickIOPathInfo info, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Parameters
info
QuickIOPathInfoThe directory to search.
searchOption
SearchOptionSearchOption
pathFormatReturn
QuickIOPathTypeSpecifies the type of path to return.
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of the full names (including paths) for the files in the directory specified by path.
Remarks
parallel file system browsing on the same hard disk (HDD/SSD) will decrease performance. Use this only on stripped RAIDs or with network shares.
EnumerateFilePathsAsync(String path, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of file names in a specified path in a seperate task created by the default TaskScheduler.
public static Task<IEnumerable<String>> EnumerateFilePathsAsync(String path, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Parameters
path
StringThe directory to search.
searchOption
SearchOptionSearchOption
pathFormatReturn
QuickIOPathTypeSpecifies the type of path to return.
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of the full names (including paths) for the files in the directory specified by path.
Remarks
parallel file system browsing on the same hard disk (HDD/SSD) will decrease performance. Use this only on stripped RAIDs or with network shares.
EnumerateFiles(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of files in a specified path.
public static IEnumerable<QuickIOFileInfo> EnumerateFiles(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Parameters
directoryInfo
QuickIODirectoryInfoThe directory to search.
searchOption
SearchOptionSearchOption
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of the full names (including paths) for the files in the directory specified by path.
Remarks
http://msdn.microsoft.com/en-us/library/dd383458(v=vs.110).aspx
EnumerateFiles(QuickIOPathInfo info, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of files in a specified path.
public static IEnumerable<QuickIOFileInfo> EnumerateFiles(QuickIOPathInfo info, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Parameters
info
QuickIOPathInfoThe directory to search.
searchOption
SearchOptionSearchOption
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of the full names (including paths) for the files in the directory specified by path.
EnumerateFiles(String path, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of files in a specified path.
public static IEnumerable<QuickIOFileInfo> EnumerateFiles(String path, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Parameters
path
StringThe directory to search.
searchOption
SearchOptionSearchOption
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of the full names (including paths) for the files in the directory specified by path.
Remarks
http://msdn.microsoft.com/en-us/library/dd383458(v=vs.110).aspx
Example
// Get subfiles
IEnumerable<QuickIOFileInfo> allSubFiles = QuickIODirectory.EnumerateFiles( @"C:\temp\QuickIO", SearchOption.AllDirectories );
foreach ( QuickIOFileInfo fileInfo in allSubFiles )
{
Console.WriteLine( "File found: {0} Readonly: {1}", fileInfo.FullName, fileInfo.IsReadOnly );
}
EnumerateFilesAsync(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of files in a specified path in a seperate task created by the default TaskScheduler.
public static Task<IEnumerable<String>> EnumerateFilesAsync(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Parameters
directoryInfo
QuickIODirectoryInfoThe directory to search.
searchOption
SearchOptionSearchOption
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of the full names (including paths) for the files in the directory specified by path.
Remarks
parallel file system browsing on the same hard disk (HDD/SSD) will decrease performance. Use this only on stripped RAIDs or with network shares.
EnumerateFilesAsync(QuickIOPathInfo info, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of files in a specified path in a seperate task created by the default TaskScheduler.
public static Task<IEnumerable<String>> EnumerateFilesAsync(QuickIOPathInfo info, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Parameters
info
QuickIOPathInfoThe directory to search.
searchOption
SearchOptionSearchOption
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of the full names (including paths) for the files in the directory specified by path.
Remarks
parallel file system browsing on the same hard disk (HDD/SSD) will decrease performance. Use this only on stripped RAIDs or with network shares.
EnumerateFilesAsync(String path, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of files in a specified path in a seperate task created by the default TaskScheduler.
public static Task<IEnumerable<String>> EnumerateFilesAsync(String path, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Parameters
path
StringThe directory to search.
searchOption
SearchOptionSearchOption
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of the full names (including paths) for the files in the directory specified by path.
Remarks
parallel file system browsing on the same hard disk (HDD/SSD) will decrease performance. Use this only on stripped RAIDs or with network shares.
EnumerateFileSystemEntries(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of file names and directory names that match a search pattern in a specified path, and optionally searches subdirectories.
public static IEnumerable<KeyValuePair<QuickIOFileSystemEntryType, String>> EnumerateFileSystemEntries(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Parameters
directoryInfo
QuickIODirectoryInfoThe directory to search.
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
searchOption
SearchOptionOne of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.The default value is TopDirectoryOnly.
Returns
An enumerable collection of file-system entries in the directory specified by path and that match the specified search pattern and option.
Remarks
http://msdn.microsoft.com/en-us/library/dd383459(v=vs.110).aspx
EnumerateFileSystemEntries(QuickIOPathInfo pathInfo, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of file names and directory names that match a search pattern in a specified path, and optionally searches subdirectories.
public static IEnumerable<KeyValuePair<QuickIOFileSystemEntryType, String>> EnumerateFileSystemEntries(QuickIOPathInfo pathInfo, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Parameters
pathInfo
QuickIOPathInfoThe directory to search.
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
searchOption
SearchOptionOne of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.The default value is TopDirectoryOnly.
Returns
An enumerable collection of file-system entries in the directory specified by path and that match the specified search pattern and option.
Remarks
http://msdn.microsoft.com/en-us/library/dd383459(v=vs.110).aspx
EnumerateFileSystemEntries(String path, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of file names and directory names that match a search pattern in a specified path, and optionally searches subdirectories.
public static IEnumerable<KeyValuePair<QuickIOFileSystemEntryType, String>> EnumerateFileSystemEntries(String path, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Parameters
path
StringThe directory to search.
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
searchOption
SearchOptionOne of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.The default value is TopDirectoryOnly.
Returns
An enumerable collection of file-system entries in the directory specified by path and that match the specified search pattern and option.
Remarks
http://msdn.microsoft.com/en-us/library/dd383459(v=vs.110).aspx
Example
// Get all with one call
IEnumerable<KeyValuePair<QuickIOPathInfo, QuickIOFileSystemEntryType>gt; allSubEntries = QuickIODirectory.EnumerateFileSystemEntries( @"C:\temp\QuickIO", SearchOption.AllDirectories );
foreach ( KeyValuePair<QuickIOPathInfo, QuickIOFileSystemEntryTypegt; subEntry in allSubEntries )
{
var pathInfo = subEntry.Key;
var type = subEntry.Value;
Console.WriteLine( "Entry found: {0} Readonly: {1}", pathInfo.FullName, type );
}
EnumerateFileSystemEntriesAsync(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of file names and directory names that match a search pattern in a specified path, and optionally searches subdirectories in a seperate task created by the default TaskScheduler.
public static Task<IEnumerable<String>> EnumerateFileSystemEntriesAsync(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Parameters
directoryInfo
QuickIODirectoryInfoThe directory to search.
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
searchOption
SearchOptionOne of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.The default value is TopDirectoryOnly.
Returns
An enumerable collection of file-system entries in the directory specified by path and that match the specified search pattern and option.
Remarks
parallel file system browsing on the same hard disk (HDD/SSD) will decrease performance. Use this only on stripped RAIDs or with network shares.
EnumerateFileSystemEntriesAsync(QuickIOPathInfo pathInfo, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of file names and directory names that match a search pattern in a specified path, and optionally searches subdirectories in a seperate task created by the default TaskScheduler.
public static Task<IEnumerable<String>> EnumerateFileSystemEntriesAsync(QuickIOPathInfo pathInfo, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Parameters
pathInfo
QuickIOPathInfoThe directory to search.
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
searchOption
SearchOptionOne of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.The default value is TopDirectoryOnly.
Returns
An enumerable collection of file-system entries in the directory specified by path and that match the specified search pattern and option.
Remarks
parallel file system browsing on the same hard disk (HDD/SSD) will decrease performance. Use this only on stripped RAIDs or with network shares.
EnumerateFileSystemEntriesAsync(String path, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of file names and directory names that match a search pattern in a specified path, and optionally searches subdirectories in a seperate task created by the default TaskScheduler.
public static Task<IEnumerable<String>> EnumerateFileSystemEntriesAsync(String path, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)
Parameters
path
StringThe directory to search.
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
searchOption
SearchOptionOne of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.The default value is TopDirectoryOnly.
Returns
An enumerable collection of file-system entries in the directory specified by path and that match the specified search pattern and option.
Remarks
parallel file system browsing on the same hard disk (HDD/SSD) will decrease performance. Use this only on stripped RAIDs or with network shares.
EnumerateFileSystemEntryPaths(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of file names and directory names that match a search pattern in a specified path, and optionally searches subdirectories.
public static IEnumerable<KeyValuePair<QuickIOFileSystemEntryType, String>> EnumerateFileSystemEntryPaths(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Parameters
directoryInfo
QuickIODirectoryInfoThe directory to search.
searchOption
SearchOptionOne of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.The default value is TopDirectoryOnly.
pathFormatReturn
QuickIOPathTypeSpecifies the type of path to return.
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of file-system entries in the directory specified by path and that match the specified search pattern and option.
Remarks
http://msdn.microsoft.com/en-us/library/dd383459(v=vs.110).aspx
EnumerateFileSystemEntryPaths(QuickIOPathInfo pathInfo, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of file names and directory names that match a search pattern in a specified path, and optionally searches subdirectories.
public static IEnumerable<KeyValuePair<QuickIOFileSystemEntryType, String>> EnumerateFileSystemEntryPaths(QuickIOPathInfo pathInfo, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Parameters
pathInfo
QuickIOPathInfoThe directory to search.
searchOption
SearchOptionOne of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.The default value is TopDirectoryOnly.
pathFormatReturn
QuickIOPathTypeSpecifies the type of path to return.
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of file-system entries in the directory specified by path and that match the specified search pattern and option.
Remarks
http://msdn.microsoft.com/en-us/library/dd383459(v=vs.110).aspx
EnumerateFileSystemEntryPaths(String path, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of file names and directory names that match a search pattern in a specified path, and optionally searches subdirectories.
public static IEnumerable<KeyValuePair<QuickIOFileSystemEntryType, String>> EnumerateFileSystemEntryPaths(String path, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Parameters
path
StringThe directory to search.
searchOption
SearchOptionOne of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.The default value is TopDirectoryOnly.
pathFormatReturn
QuickIOPathTypeSpecifies the type of path to return.
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of file-system entries in the directory specified by path and that match the specified search pattern and option.
Remarks
http://msdn.microsoft.com/en-us/library/dd383459(v=vs.110).aspx
EnumerateFileSystemEntryPathsAsync(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of file names and directory names that match a search pattern in a specified path, and optionally searches subdirectories in a seperate task created by the default TaskScheduler.
public static Task<IEnumerable<String>> EnumerateFileSystemEntryPathsAsync(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Parameters
directoryInfo
QuickIODirectoryInfoThe directory to search.
searchOption
SearchOptionOne of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.The default value is TopDirectoryOnly.
pathFormatReturn
QuickIOPathTypeSpecifies the type of path to return.
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of file-system entries in the directory specified by path and that match the specified search pattern and option.
Remarks
parallel file system browsing on the same hard disk (HDD/SSD) will decrease performance. Use this only on stripped RAIDs or with network shares.
EnumerateFileSystemEntryPathsAsync(QuickIOPathInfo pathInfo, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of file names and directory names that match a search pattern in a specified path, and optionally searches subdirectories in a seperate task created by the default TaskScheduler.
public static Task<IEnumerable<String>> EnumerateFileSystemEntryPathsAsync(QuickIOPathInfo pathInfo, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Parameters
pathInfo
QuickIOPathInfoThe directory to search.
searchOption
SearchOptionOne of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.The default value is TopDirectoryOnly.
pathFormatReturn
QuickIOPathTypeSpecifies the type of path to return.
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of file-system entries in the directory specified by path and that match the specified search pattern and option.
Remarks
parallel file system browsing on the same hard disk (HDD/SSD) will decrease performance. Use this only on stripped RAIDs or with network shares.
EnumerateFileSystemEntryPathsAsync(String path, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Returns an enumerable collection of file names and directory names that match a search pattern in a specified path, and optionally searches subdirectories in a seperate task created by the default TaskScheduler.
public static Task<IEnumerable<String>> EnumerateFileSystemEntryPathsAsync(String path, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)
Parameters
path
StringThe directory to search.
searchOption
SearchOptionOne of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.The default value is TopDirectoryOnly.
pathFormatReturn
QuickIOPathTypeSpecifies the type of path to return.
enumerateOptions
QuickIOEnumerateOptionsOptions QuickIOEnumerateOptions
Returns
An enumerable collection of file-system entries in the directory specified by path and that match the specified search pattern and option.
Remarks
parallel file system browsing on the same hard disk (HDD/SSD) will decrease performance. Use this only on stripped RAIDs or with network shares.
Exists(QuickIODirectoryInfo directoryInfo)
Checks whether the given directory exists.
public static Boolean Exists(QuickIODirectoryInfo directoryInfo)
Parameters
directoryInfo
QuickIODirectoryInfoThe path to test.
Returns
true if exists; otherwise, false.
Exceptions
UnmatchedFileSystemEntryTypeException
Searched for file but found folder.
InvalidPathException
Path is invalid.
Remarks
http://msdn.microsoft.com/en-us/library/system.io.directory.exists(v=vs.110).aspx
Exists(QuickIOPathInfo pathInfo)
Checks whether the given directory exists.
public static Boolean Exists(QuickIOPathInfo pathInfo)
Parameters
pathInfo
QuickIOPathInfoThe path to test.
Returns
true if exists; otherwise, false.
Exceptions
UnmatchedFileSystemEntryTypeException
Searched for file but found folder.
InvalidPathException
Path is invalid.
Remarks
http://msdn.microsoft.com/en-us/library/system.io.directory.exists(v=vs.110).aspx
Exists(String path)
Checks whether the given directory exists.
public static Boolean Exists(String path)
Parameters
path
StringThe path to test.
Returns
true if exists; otherwise, false.
Exceptions
UnmatchedFileSystemEntryTypeException
Searched for file but found folder.
InvalidPathException
Path is invalid.
Remarks
http://msdn.microsoft.com/en-us/library/system.io.directory.exists(v=vs.110).aspx
GetAttributes(QuickIODirectoryInfo info)
Gets the FileAttributes of the directory or file.
public static FileAttributes GetAttributes(QuickIODirectoryInfo info)
Parameters
info
QuickIODirectoryInfoA directory or file.
Returns
The FileAttributes of the directory or file.
GetAttributes(QuickIOPathInfo info)
Gets the FileAttributes of the directory or file.
public static FileAttributes GetAttributes(QuickIOPathInfo info)
Parameters
info
QuickIOPathInfoA directory or file.
Returns
The FileAttributes of the directory or file.
GetAttributes(String path)
Gets the FileAttributes of the directory or file.
public static FileAttributes GetAttributes(String path)
Parameters
path
StringThe path to the directory or file.
Returns
The FileAttributes of the directory or file.
GetCreationTime(QuickIODirectoryInfo info)
Returns the creation time of the file or directory
public static DateTime GetCreationTime(QuickIODirectoryInfo info)
Parameters
info
QuickIODirectoryInfoAffected file or directory
Returns
A DateTime structure.
Exceptions
PathNotFoundException
No entry found for passed path
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.getcreationtime(v=vs.110).aspx
GetCreationTime(QuickIOPathInfo info)
Returns the creation time of the file or directory
public static DateTime GetCreationTime(QuickIOPathInfo info)
Parameters
info
QuickIOPathInfoAffected file or directory
Returns
A DateTime structure.
Exceptions
PathNotFoundException
No entry found for passed path
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.getcreationtime(v=vs.110).aspx
GetCreationTime(String path)
Returns the creation time of the file or directory
public static DateTime GetCreationTime(String path)
Parameters
path
StringAffected file or directory
Returns
A DateTime structure.
Exceptions
PathNotFoundException
No entry found for passed path
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.getcreationtime(v=vs.110).aspx
GetCreationTimeUtc(QuickIODirectoryInfo info)
Returns the creation time of the file or directory (UTC)
public static DateTime GetCreationTimeUtc(QuickIODirectoryInfo info)
Parameters
info
QuickIODirectoryInfoAffected file or directory
Returns
A DateTime structure. (UTC)
Exceptions
PathNotFoundException
No entry found for passed path
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.getcreationtimeutc(v=vs.110).aspx
GetCreationTimeUtc(QuickIOPathInfo info)
Returns the creation time of the file or directory (UTC)
public static DateTime GetCreationTimeUtc(QuickIOPathInfo info)
Parameters
info
QuickIOPathInfoAffected file or directory
Returns
A DateTime structure. (UTC)
Exceptions
PathNotFoundException
No entry found for passed path
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.getcreationtimeutc(v=vs.110).aspx
GetCreationTimeUtc(String path)
Returns the creation time of the file or directory (UTC)
public static DateTime GetCreationTimeUtc(String path)
Parameters
path
StringAffected file or directory
Returns
A DateTime structure. (UTC)
Exceptions
PathNotFoundException
No entry found for passed path
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.getcreationtimeutc(v=vs.110).aspx
GetLastAccessTime(QuickIODirectoryInfo info)
Returns the time of last access of the file or directory
public static DateTime GetLastAccessTime(QuickIODirectoryInfo info)
Parameters
info
QuickIODirectoryInfoAffected file or directory
Returns
A DateTime structure.
Exceptions
PathNotFoundException
No entry found for passed path
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.getlastaccesstime(v=vs.110).aspx
GetLastAccessTime(QuickIOPathInfo info)
Returns the time of last access of the file or directory
public static DateTime GetLastAccessTime(QuickIOPathInfo info)
Parameters
info
QuickIOPathInfoAffected file or directory
Returns
A DateTime structure.
Exceptions
PathNotFoundException
No entry found for passed path
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.getlastaccesstime(v=vs.110).aspx
GetLastAccessTime(String path)
Returns the time of last access of the file or directory
public static DateTime GetLastAccessTime(String path)
Parameters
path
StringAffected file or directory
Returns
A DateTime structure.
Exceptions
PathNotFoundException
No entry found for passed path
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.getlastaccesstime(v=vs.110).aspx
GetLastAccessTimeUtc(QuickIODirectoryInfo info)
Returns the time of last access of the file or directory (UTC)
public static DateTime GetLastAccessTimeUtc(QuickIODirectoryInfo info)
Parameters
info
QuickIODirectoryInfoAffected file or directory
Returns
A DateTime structure. (UTC)
Exceptions
PathNotFoundException
No entry found for passed path
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.getlastaccesstimeutc(v=vs.110).aspx
GetLastAccessTimeUtc(QuickIOPathInfo info)
Returns the time of last access of the file or directory (UTC)
public static DateTime GetLastAccessTimeUtc(QuickIOPathInfo info)
Parameters
info
QuickIOPathInfoAffected file or directory
Returns
A DateTime structure. (UTC)
Exceptions
PathNotFoundException
No entry found for passed path
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.getlastaccesstimeutc(v=vs.110).aspx
GetLastAccessTimeUtc(String path)
Returns the time of last access of the file or directory (UTC)
public static DateTime GetLastAccessTimeUtc(String path)
Parameters
path
StringAffected file or directory
Returns
A DateTime structure. (UTC)
Exceptions
PathNotFoundException
No entry found for passed path
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.getlastaccesstimeutc(v=vs.110).aspx
GetLastWriteTime(QuickIODirectoryInfo info)
Returns the time of the file or directory was last written
public static DateTime GetLastWriteTime(QuickIODirectoryInfo info)
Parameters
info
QuickIODirectoryInfoAffected file or directory
Returns
A DateTime structure.
Exceptions
PathNotFoundException
No entry found for passed path
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.getlastwritetime(v=vs.110).aspx
GetLastWriteTime(QuickIOPathInfo info)
Returns the time of the file or directory was last written
public static DateTime GetLastWriteTime(QuickIOPathInfo info)
Parameters
info
QuickIOPathInfoAffected file or directory
Returns
A DateTime structure.
Exceptions
PathNotFoundException
No entry found for passed path
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.getlastwritetime(v=vs.110).aspx
GetLastWriteTime(String path)
Returns the time of the file or directory was last written
public static DateTime GetLastWriteTime(String path)
Parameters
path
StringAffected file or directory
Returns
A DateTime structure.
Exceptions
PathNotFoundException
No entry found for passed path
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.getlastwritetime(v=vs.110).aspx
GetLastWriteTimeUtc(QuickIODirectoryInfo info)
Returns the time of the file or directory was last written (UTC)
public static DateTime GetLastWriteTimeUtc(QuickIODirectoryInfo info)
Parameters
info
QuickIODirectoryInfoAffected file or directory
Returns
A DateTime structure. (UTC)
Exceptions
PathNotFoundException
No entry found for passed path
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.getlastwritetimeutc(v=vs.110).aspx
GetLastWriteTimeUtc(QuickIOPathInfo info)
Returns the time of the file or directory was last written (UTC)
public static DateTime GetLastWriteTimeUtc(QuickIOPathInfo info)
Parameters
info
QuickIOPathInfoAffected file or directory
Returns
A DateTime structure. (UTC)
Exceptions
PathNotFoundException
No entry found for passed path
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.getlastwritetimeutc(v=vs.110).aspx
GetLastWriteTimeUtc(String path)
Returns the time of the file or directory was last written (UTC)
public static DateTime GetLastWriteTimeUtc(String path)
Parameters
path
StringAffected file or directory
Returns
A DateTime structure. (UTC)
Exceptions
PathNotFoundException
No entry found for passed path
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.getlastwritetimeutc(v=vs.110).aspx
GetMetadastaAsync(String directoryPath)
Receives QuickIODirectoryMetadata of current directory using a sperare Task
public static Task<QuickIODirectoryMetadata> GetMetadastaAsync(String directoryPath)
Returns
QuickIODirectoryMetadata
GetMetadata(QuickIODirectoryInfo directoryInfo)
Receives QuickIODirectoryMetadata of current directory
public static QuickIODirectoryMetadata GetMetadata(QuickIODirectoryInfo directoryInfo)
Returns
QuickIODirectoryMetadata
GetMetadata(QuickIOPathInfo pathInfo)
Receives QuickIODirectoryMetadata of current directory
public static QuickIODirectoryMetadata GetMetadata(QuickIOPathInfo pathInfo)
Returns
QuickIODirectoryMetadata
GetMetadata(String directoryPath)
Receives QuickIODirectoryMetadata of current directory
public static QuickIODirectoryMetadata GetMetadata(String directoryPath)
Returns
QuickIODirectoryMetadata
GetMetadataAsync(QuickIODirectoryInfo directoryInfo)
Receives QuickIODirectoryMetadata of current directory using a sperare Task
public static Task<QuickIODirectoryMetadata> GetMetadataAsync(QuickIODirectoryInfo directoryInfo)
Returns
QuickIODirectoryMetadata
GetMetadataAsync(QuickIOPathInfo pathInfo)
Receives QuickIODirectoryMetadata of current directory using a sperare Task
public static Task<QuickIODirectoryMetadata> GetMetadataAsync(QuickIOPathInfo pathInfo)
Returns
QuickIODirectoryMetadata
GetMetadataAsync(String directoryPath)
Receives QuickIODirectoryMetadata of current directory using a sperare Task
public static Task<QuickIODirectoryMetadata> GetMetadataAsync(String directoryPath)
Returns
QuickIODirectoryMetadata
GetStatistics(QuickIODirectoryInfo directoryInfo)
Gets the directory statistics: total files, folders and bytes
public static QuickIOFolderStatisticResult GetStatistics(QuickIODirectoryInfo directoryInfo)
Parameters
directoryInfo
QuickIODirectoryInfoReturns
A QuickIOFolderStatisticResult object that holds the folder statistics such as number of folders, files and total bytes
Example
This example shows how to call with QuickIODirectoryInfo and write the result to the console. public static void GetStatisticsWithDirectoryInfo_Example() { QuickIODirectoryInfo targetDirectoryPathInfo = new QuickIODirectoryInfo( @"C:\temp\QuickIOTest" );
// Get statistics
QuickIOFolderStatisticResult stats = QuickIODirectory.GetStatistics( targetDirectoryPathInfo );
// Output
Console.WriteLine( "[Stats] Folders: '{0}' Files: '{1}' Total TotalBytes '{2}'", stats.FolderCount, stats.FileCount, stats.TotalBytes );
}
GetStatistics(QuickIOPathInfo pathInfo)
Gets the directory statistics: total files, folders and bytes
public static QuickIOFolderStatisticResult GetStatistics(QuickIOPathInfo pathInfo)
Parameters
pathInfo
QuickIOPathInfoReturns
A QuickIOFolderStatisticResult object that holds the folder statistics such as number of folders, files and total bytes
Example
This example shows how to call with QuickIOPathInfo and write the result to the console. public static void GetStatisticsWithPathInfo_Example() { QuickIOPathInfo targetDirectoryPathInfo = new QuickIOPathInfo( @"C:\temp\QuickIOTest" );
// Get statistics
QuickIOFolderStatisticResult stats = QuickIODirectory.GetStatistics( targetDirectoryPathInfo );
// Output
Console.WriteLine( "[Stats] Folders: '{0}' Files: '{1}' Total TotalBytes '{2}'", stats.FolderCount, stats.FileCount, stats.TotalBytes );
}
GetStatistics(String path)
Gets the directory statistics: total files, folders and bytes
public static QuickIOFolderStatisticResult GetStatistics(String path)
Parameters
path
StringReturns
A QuickIOFolderStatisticResult object that holds the folder statistics such as number of folders, files and total bytes
Example
This example shows how to call and write the result to the console. public static void GetStatisticsWithStringPath_Example() { const string targetDirectoryPath = @"C:\temp\QuickIOTest";
// Get statistics
QuickIOFolderStatisticResult statsResult = QuickIODirectory.GetStatistics( targetDirectoryPath );
// Output
Console.WriteLine( "[Stats] Folders: '{0}' Files: '{1}' Total TotalBytes '{2}'", statsResult.FolderCount, statsResult.FileCount, statsResult.TotalBytes );
}
Move(String from, String to, Boolean overwrite)
Moves a directory
public static void Move(String from, String to, Boolean overwrite)
Parameters
from
StringFullname to move
to
StringFull targetname
overwrite
Booleantrue to overwrite target
Exceptions
DirectoryAlreadyExistsException
Target exists
RemoveAttribute(QuickIODirectoryInfo info, FileAttributes attribute)
Removes the specified attribute from file or directory
public static Boolean RemoveAttribute(QuickIODirectoryInfo info, FileAttributes attribute)
Parameters
info
QuickIODirectoryInfoA directory or file.
attribute
FileAttributesAttribute to remove
Returns
true if removed. false if not exists in attributes
RemoveAttribute(QuickIOPathInfo info, FileAttributes attribute)
Removes the specified attribute from file or directory
public static Boolean RemoveAttribute(QuickIOPathInfo info, FileAttributes attribute)
Parameters
info
QuickIOPathInfoA directory or file.
attribute
FileAttributesAttribute to remove
Returns
true if removed. false if not exists in attributes
RemoveAttribute(String path, FileAttributes attribute)
Removes the specified attribute from file or directory
public static Boolean RemoveAttribute(String path, FileAttributes attribute)
Parameters
path
StringA directory or file.
attribute
FileAttributesAttribute to remove
Returns
true if removed. false if not exists in attributes
SetAllFileTimes(QuickIODirectoryInfo info, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime)
Sets the time the file was created.
public static void SetAllFileTimes(QuickIODirectoryInfo info, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime)
Parameters
info
QuickIODirectoryInfoAffected file or directory
creationTime
DateTimeThe time that is to be used
lastAccessTime
DateTimeThe time that is to be used
lastWriteTime
DateTimeThe time that is to be used
SetAllFileTimes(QuickIOPathInfo info, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime)
Sets the time the file was created.
public static void SetAllFileTimes(QuickIOPathInfo info, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime)
Parameters
info
QuickIOPathInfoAffected file or directory
creationTime
DateTimeThe time that is to be used
lastAccessTime
DateTimeThe time that is to be used
lastWriteTime
DateTimeThe time that is to be used
SetAllFileTimes(String path, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime)
Sets the time the file was created.
public static void SetAllFileTimes(String path, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime)
Parameters
path
StringAffected file or directory
creationTime
DateTimeThe time that is to be used
lastAccessTime
DateTimeThe time that is to be used
lastWriteTime
DateTimeThe time that is to be used
SetAllFileTimesUtc(QuickIODirectoryInfo info, DateTime creationTimeUtc, DateTime lastAccessTimeUtc, DateTime lastWriteTimeUtc)
Sets the dates and times of given directory or file.
public static void SetAllFileTimesUtc(QuickIODirectoryInfo info, DateTime creationTimeUtc, DateTime lastAccessTimeUtc, DateTime lastWriteTimeUtc)
Parameters
info
QuickIODirectoryInfoAffected file or directory
creationTimeUtc
DateTimeThe time that is to be used (UTC)
lastAccessTimeUtc
DateTimeThe time that is to be used (UTC)
lastWriteTimeUtc
DateTimeThe time that is to be used (UTC)
SetAllFileTimesUtc(QuickIOPathInfo info, DateTime creationTimeUtc, DateTime lastAccessTimeUtc, DateTime lastWriteTimeUtc)
Sets the dates and times of given directory or file.
public static void SetAllFileTimesUtc(QuickIOPathInfo info, DateTime creationTimeUtc, DateTime lastAccessTimeUtc, DateTime lastWriteTimeUtc)
Parameters
info
QuickIOPathInfoAffected file or directory
creationTimeUtc
DateTimeThe time that is to be used (UTC)
lastAccessTimeUtc
DateTimeThe time that is to be used (UTC)
lastWriteTimeUtc
DateTimeThe time that is to be used (UTC)
SetAllFileTimesUtc(String path, DateTime creationTimeUtc, DateTime lastAccessTimeUtc, DateTime lastWriteTimeUtc)
Sets the dates and times of given directory or file.
public static void SetAllFileTimesUtc(String path, DateTime creationTimeUtc, DateTime lastAccessTimeUtc, DateTime lastWriteTimeUtc)
Parameters
path
StringAffected file or directory
creationTimeUtc
DateTimeThe time that is to be used (UTC)
lastAccessTimeUtc
DateTimeThe time that is to be used (UTC)
lastWriteTimeUtc
DateTimeThe time that is to be used (UTC)
SetAttributes(QuickIODirectoryInfo info, FileAttributes attributes)
Gets the FileAttributes of the directory or file.
public static void SetAttributes(QuickIODirectoryInfo info, FileAttributes attributes)
Parameters
info
QuickIODirectoryInfoA directory or file.
attributes
FileAttributesNew attributes to set.
Returns
The FileAttributes of the directory or file.
SetAttributes(QuickIOPathInfo info, FileAttributes attributes)
Gets the FileAttributes of the directory or file.
public static void SetAttributes(QuickIOPathInfo info, FileAttributes attributes)
Parameters
info
QuickIOPathInfoA directory or file.
attributes
FileAttributesNew attributes to set.
Returns
The FileAttributes of the directory or file.
SetAttributes(String path, FileAttributes attributes)
Gets the FileAttributes of the directory or file.
public static void SetAttributes(String path, FileAttributes attributes)
Parameters
path
StringThe path to the directory or file.
attributes
FileAttributesNew attributes to set.
Returns
The FileAttributes of the directory or file.
SetCreationTime(QuickIODirectoryInfo info, DateTime creationTime)
Defines the time at which the file or directory was created
public static void SetCreationTime(QuickIODirectoryInfo info, DateTime creationTime)
Parameters
info
QuickIODirectoryInfoAffected file or directory
creationTime
DateTimeThe time that is to be used
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.setcreationtime(v=vs.110).aspx
SetCreationTime(QuickIOPathInfo info, DateTime creationTime)
Defines the time at which the file or directory was created
public static void SetCreationTime(QuickIOPathInfo info, DateTime creationTime)
Parameters
info
QuickIOPathInfoAffected file or directory
creationTime
DateTimeThe time that is to be used
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.setcreationtime(v=vs.110).aspx
SetCreationTime(String path, DateTime creationTime)
Defines the time at which the file or directory was created
public static void SetCreationTime(String path, DateTime creationTime)
Parameters
path
StringAffected file or directory
creationTime
DateTimeThe time that is to be used
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.setcreationtime(v=vs.110).aspx
SetCreationTimeUtc(QuickIODirectoryInfo info, DateTime creationTimeUtc)
Defines the time at which the file or directory was created (UTC)
public static void SetCreationTimeUtc(QuickIODirectoryInfo info, DateTime creationTimeUtc)
Parameters
info
QuickIODirectoryInfoAffected file or directory
creationTimeUtc
DateTimeThe time that is to be used (UTC)
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.setcreationtimeutc(v=vs.110).aspx
SetCreationTimeUtc(QuickIOPathInfo info, DateTime creationTimeUtc)
Defines the time at which the file or directory was created (UTC)
public static void SetCreationTimeUtc(QuickIOPathInfo info, DateTime creationTimeUtc)
Parameters
info
QuickIOPathInfoAffected file or directory
creationTimeUtc
DateTimeThe time that is to be used (UTC)
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.setcreationtimeutc(v=vs.110).aspx
SetCreationTimeUtc(String path, DateTime creationTimeUtc)
Defines the time at which the file or directory was created (UTC)
public static void SetCreationTimeUtc(String path, DateTime creationTimeUtc)
Parameters
path
StringAffected file or directory
creationTimeUtc
DateTimeThe time that is to be used (UTC)
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.setcreationtimeutc(v=vs.110).aspx
SetLastAccessTime(QuickIODirectoryInfo info, DateTime lastAccessTime)
Defines the time at which the file or directory was last accessed
public static void SetLastAccessTime(QuickIODirectoryInfo info, DateTime lastAccessTime)
Parameters
info
QuickIODirectoryInfoAffected file or directory
lastAccessTime
DateTimeThe time that is to be used
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.setlastaccesstime(v=vs.110).aspx
SetLastAccessTime(QuickIOPathInfo info, DateTime lastAccessTime)
Defines the time at which the file or directory was last accessed
public static void SetLastAccessTime(QuickIOPathInfo info, DateTime lastAccessTime)
Parameters
info
QuickIOPathInfoAffected file or directory
lastAccessTime
DateTimeThe time that is to be used
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.setlastaccesstime(v=vs.110).aspx
SetLastAccessTime(String path, DateTime lastAccessTime)
Defines the time at which the file or directory was last accessed
public static void SetLastAccessTime(String path, DateTime lastAccessTime)
Parameters
path
StringAffected file or directory
lastAccessTime
DateTimeThe time that is to be used
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.setcreationtime(v=vs.110).aspx
SetLastAccessTimeUtc(QuickIODirectoryInfo info, DateTime lastAccessTimeUtc)
Defines the time at which the file or directory was last accessed (UTC)
public static void SetLastAccessTimeUtc(QuickIODirectoryInfo info, DateTime lastAccessTimeUtc)
Parameters
info
QuickIODirectoryInfoAffected file or directory
lastAccessTimeUtc
DateTimeThe time that is to be used (UTC)
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.setlastaccesstimeutc(v=vs.110).aspx
SetLastAccessTimeUtc(QuickIOPathInfo info, DateTime lastAccessTimeUtc)
Defines the time at which the file or directory was last accessed (UTC)
public static void SetLastAccessTimeUtc(QuickIOPathInfo info, DateTime lastAccessTimeUtc)
Parameters
info
QuickIOPathInfoAffected file or directory
lastAccessTimeUtc
DateTimeThe time that is to be used (UTC)
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.setlastaccesstimeutc(v=vs.110).aspx
SetLastAccessTimeUtc(String path, DateTime lastAccessTimeUtc)
Defines the time at which the file or directory was last accessed (UTC)
public static void SetLastAccessTimeUtc(String path, DateTime lastAccessTimeUtc)
Parameters
path
StringAffected file or directory
lastAccessTimeUtc
DateTimeThe time that is to be used (UTC)
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.setlastaccesstimeutc(v=vs.110).aspx
SetLastWriteTime(QuickIODirectoryInfo info, DateTime lastWriteTime)
Defines the time at which the file or directory was last written
public static void SetLastWriteTime(QuickIODirectoryInfo info, DateTime lastWriteTime)
Parameters
info
QuickIODirectoryInfoAffected file or directory
lastWriteTime
DateTimeThe time that is to be used
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.setlastwritetime(v=vs.110).aspx
SetLastWriteTime(QuickIOPathInfo info, DateTime lastWriteTime)
Defines the time at which the file or directory was last written
public static void SetLastWriteTime(QuickIOPathInfo info, DateTime lastWriteTime)
Parameters
info
QuickIOPathInfoAffected file or directory
lastWriteTime
DateTimeThe time that is to be used
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.setlastwritetime(v=vs.110).aspx
SetLastWriteTime(String path, DateTime lastWriteTime)
Defines the time at which the file or directory was last written
public static void SetLastWriteTime(String path, DateTime lastWriteTime)
Parameters
path
StringAffected file or directory
lastWriteTime
DateTimeThe time that is to be used
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.setcreationtime(v=vs.110).aspx
SetLastWriteTimeUtc(QuickIODirectoryInfo info, DateTime lastWriteTimeUtc)
Defines the time at which the file or directory was last written (UTC)
public static void SetLastWriteTimeUtc(QuickIODirectoryInfo info, DateTime lastWriteTimeUtc)
Parameters
info
QuickIODirectoryInfoAffected file or directory
lastWriteTimeUtc
DateTimeThe time that is to be used (UTC)
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.setlastwritetimeutc(v=vs.110).aspx
SetLastWriteTimeUtc(QuickIOPathInfo info, DateTime lastWriteTimeUtc)
Defines the time at which the file or directory was last written (UTC)
public static void SetLastWriteTimeUtc(QuickIOPathInfo info, DateTime lastWriteTimeUtc)
Parameters
info
QuickIOPathInfoAffected file or directory
lastWriteTimeUtc
DateTimeThe time that is to be used (UTC)
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.setlastwritetimeutc(v=vs.110).aspx
SetLastWriteTimeUtc(String path, DateTime lastWriteTimeUtc)
Defines the time at which the file or directory was last written (UTC)
public static void SetLastWriteTimeUtc(String path, DateTime lastWriteTimeUtc)
Parameters
path
StringAffected file or directory
lastWriteTimeUtc
DateTimeThe time that is to be used (UTC)
Remarks
http://msdn.microsoft.com/en-us/library/system.io.file.setlastwritetimeutc(v=vs.110).aspx