Methods (110)
Namespace: SchwabenCode.QuickIO

Syntax

public static class QuickIODirectory

Summary

Provides static methods to access folders. For example creating, deleting and retrieving content and security information such as the owner.

Uses

Used by

Methods

AddAttribute(QuickIODirectoryInfo info, FileAttributes attribute)

Adds the specified attribute to file or directory

public static Boolean AddAttribute(QuickIODirectoryInfo info, FileAttributes attribute)

Parameters

info

QuickIODirectoryInfo

A directory or file.

attribute

FileAttributes

Attribute 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

QuickIOPathInfo

A directory or file.

attribute

FileAttributes

Attribute 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

String

A directory or file.

attribute

FileAttributes

Attribute to add

Returns

true if added. false if already exists in attributes

public static void Copy(QuickIODirectoryInfo source, QuickIOPathInfo target, Boolean overwrite)

Parameters

source

QuickIODirectoryInfo

Source directory

target

QuickIOPathInfo

Target directory

overwrite

Boolean

true 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

String

Source directory

target

String

Target directory

overwrite

Boolean

true 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

QuickIOPathInfo

The directory.

recursive

Boolean

If 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

String

The path to the directory.

recursive

Boolean

If 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

QuickIOPathInfo

The name of the directory to remove.

recursive

Boolean

true 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

String

The name of the directory to remove.

recursive

Boolean

true 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 } }

public static IEnumerable<QuickIODirectoryInfo> EnumerateDirectories(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)

Parameters

directoryInfo

QuickIODirectoryInfo

The directory to search.

searchOption

SearchOption

SearchOption

enumerateOptions

QuickIOEnumerateOptions

Options 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

QuickIOPathInfo

The directory to search.

searchOption

SearchOption

SearchOption

enumerateOptions

QuickIOEnumerateOptions

Options 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

String

The directory to search.

searchOption

SearchOption

SearchOption

enumerateOptions

QuickIOEnumerateOptions

Options 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

QuickIODirectoryInfo

The directory to search.

searchOption

SearchOption

SearchOption

enumerateOptions

QuickIOEnumerateOptions

Options 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

QuickIOPathInfo

The directory to search.

searchOption

SearchOption

SearchOption

enumerateOptions

QuickIOEnumerateOptions

Options 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

String

The directory to search.

enumerateOptions

QuickIOEnumerateOptions

Options QuickIOEnumerateOptions

searchOption

SearchOption

SearchOption

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.

public static IEnumerable<String> EnumerateDirectoryPaths(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)

Parameters

directoryInfo

QuickIODirectoryInfo

The directory to search.

searchOption

SearchOption

SearchOption

pathFormatReturn

QuickIOPathType

Specifies the type of path to return.

enumerateOptions

QuickIOEnumerateOptions

Options 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

public static IEnumerable<String> EnumerateDirectoryPaths(QuickIOPathInfo info, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)

Parameters

info

QuickIOPathInfo

The directory to search.

searchOption

SearchOption

SearchOption

pathFormatReturn

QuickIOPathType

Specifies the type of path to return.

enumerateOptions

QuickIOEnumerateOptions

Options 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

public static IEnumerable<String> EnumerateDirectoryPaths(String path, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)

Parameters

path

String

The directory to search.

searchOption

SearchOption

SearchOption

pathFormatReturn

QuickIOPathType

Specifies the type of path to return.

enumerateOptions

QuickIOEnumerateOptions

Options 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

QuickIODirectoryInfo

The directory to search.

searchOption

SearchOption

SearchOption

pathFormatReturn

QuickIOPathType

Specifies the type of path to return.

enumerateOptions

QuickIOEnumerateOptions

Options 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

QuickIOPathInfo

The directory to search.

searchOption

SearchOption

SearchOption

enumerateOptions

QuickIOEnumerateOptions

Options QuickIOEnumerateOptions

pathFormatReturn

QuickIOPathType

Specifies 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.

public static Task<IEnumerable<String>> EnumerateDirectoryPathsAsync(String path, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)

Parameters

path

String

The directory to search.

searchOption

SearchOption

SearchOption

enumerateOptions

QuickIOEnumerateOptions

Options QuickIOEnumerateOptions

pathFormatReturn

QuickIOPathType

Specifies 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.

public static IEnumerable<String> EnumerateFilePaths(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)

Parameters

directoryInfo

QuickIODirectoryInfo

The directory to search.

searchOption

SearchOption

SearchOption

pathFormatReturn

QuickIOPathType

Specifies the type of path to return.

enumerateOptions

QuickIOEnumerateOptions

Options 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

public static IEnumerable<String> EnumerateFilePaths(QuickIOPathInfo info, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)

Parameters

info

QuickIOPathInfo

The directory to search.

searchOption

SearchOption

SearchOption

pathFormatReturn

QuickIOPathType

Specifies the type of path to return.

enumerateOptions

QuickIOEnumerateOptions

Options 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

public static IEnumerable<String> EnumerateFilePaths(String path, SearchOption searchOption, QuickIOPathType pathFormatReturn, QuickIOEnumerateOptions enumerateOptions)

Parameters

path

String

The directory to search.

searchOption

SearchOption

SearchOption

pathFormatReturn

QuickIOPathType

Specifies the type of path to return.

enumerateOptions

QuickIOEnumerateOptions

Options 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

QuickIODirectoryInfo

The directory to search.

searchOption

SearchOption

SearchOption

pathFormatReturn

QuickIOPathType

Specifies the type of path to return.

enumerateOptions

QuickIOEnumerateOptions

Options 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

QuickIOPathInfo

The directory to search.

searchOption

SearchOption

SearchOption

pathFormatReturn

QuickIOPathType

Specifies the type of path to return.

enumerateOptions

QuickIOEnumerateOptions

Options 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

String

The directory to search.

searchOption

SearchOption

SearchOption

pathFormatReturn

QuickIOPathType

Specifies the type of path to return.

enumerateOptions

QuickIOEnumerateOptions

Options 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.

public static IEnumerable<QuickIOFileInfo> EnumerateFiles(QuickIODirectoryInfo directoryInfo, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)

Parameters

directoryInfo

QuickIODirectoryInfo

The directory to search.

searchOption

SearchOption

SearchOption

enumerateOptions

QuickIOEnumerateOptions

Options 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

public static IEnumerable<QuickIOFileInfo> EnumerateFiles(QuickIOPathInfo info, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)

Parameters

info

QuickIOPathInfo

The directory to search.

searchOption

SearchOption

SearchOption

enumerateOptions

QuickIOEnumerateOptions

Options QuickIOEnumerateOptions

Returns

An enumerable collection of the full names (including paths) for the files in the directory specified by path.

public static IEnumerable<QuickIOFileInfo> EnumerateFiles(String path, SearchOption searchOption, QuickIOEnumerateOptions enumerateOptions)

Parameters

path

String

The directory to search.

searchOption

SearchOption

SearchOption

enumerateOptions

QuickIOEnumerateOptions

Options 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

QuickIODirectoryInfo

The directory to search.

searchOption

SearchOption

SearchOption

enumerateOptions

QuickIOEnumerateOptions

Options 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

QuickIOPathInfo

The directory to search.

searchOption

SearchOption

SearchOption

enumerateOptions

QuickIOEnumerateOptions

Options 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

String

The directory to search.

searchOption

SearchOption

SearchOption

enumerateOptions

QuickIOEnumerateOptions

Options 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

QuickIODirectoryInfo

The directory to search.

enumerateOptions

QuickIOEnumerateOptions

Options QuickIOEnumerateOptions

searchOption

SearchOption

One 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

QuickIOPathInfo

The directory to search.

enumerateOptions

QuickIOEnumerateOptions

Options QuickIOEnumerateOptions

searchOption

SearchOption

One 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

String

The directory to search.

enumerateOptions

QuickIOEnumerateOptions

Options QuickIOEnumerateOptions

searchOption

SearchOption

One 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

QuickIODirectoryInfo

The directory to search.

enumerateOptions

QuickIOEnumerateOptions

Options QuickIOEnumerateOptions

searchOption

SearchOption

One 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

QuickIOPathInfo

The directory to search.

enumerateOptions

QuickIOEnumerateOptions

Options QuickIOEnumerateOptions

searchOption

SearchOption

One 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

String

The directory to search.

enumerateOptions

QuickIOEnumerateOptions

Options QuickIOEnumerateOptions

searchOption

SearchOption

One 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

QuickIODirectoryInfo

The directory to search.

searchOption

SearchOption

One 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

QuickIOPathType

Specifies the type of path to return.

enumerateOptions

QuickIOEnumerateOptions

Options 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

QuickIOPathInfo

The directory to search.

searchOption

SearchOption

One 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

QuickIOPathType

Specifies the type of path to return.

enumerateOptions

QuickIOEnumerateOptions

Options 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

String

The directory to search.

searchOption

SearchOption

One 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

QuickIOPathType

Specifies the type of path to return.

enumerateOptions

QuickIOEnumerateOptions

Options 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

QuickIODirectoryInfo

The directory to search.

searchOption

SearchOption

One 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

QuickIOPathType

Specifies the type of path to return.

enumerateOptions

QuickIOEnumerateOptions

Options 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

QuickIOPathInfo

The directory to search.

searchOption

SearchOption

One 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

QuickIOPathType

Specifies the type of path to return.

enumerateOptions

QuickIOEnumerateOptions

Options 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

String

The directory to search.

searchOption

SearchOption

One 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

QuickIOPathType

Specifies the type of path to return.

enumerateOptions

QuickIOEnumerateOptions

Options 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

QuickIODirectoryInfo

The 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

QuickIOPathInfo

The 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

String

The 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

QuickIODirectoryInfo

A 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

QuickIOPathInfo

A 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

String

The 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

QuickIODirectoryInfo

Affected 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

QuickIOPathInfo

Affected 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

String

Affected 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

QuickIODirectoryInfo

Affected 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

QuickIOPathInfo

Affected 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

String

Affected 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

QuickIODirectoryInfo

Affected 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

QuickIOPathInfo

Affected 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

String

Affected 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

QuickIODirectoryInfo

Affected 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

QuickIOPathInfo

Affected 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

String

Affected 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

QuickIODirectoryInfo

Affected 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

QuickIOPathInfo

Affected 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

String

Affected 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

QuickIODirectoryInfo

Affected 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

QuickIOPathInfo

Affected 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

String

Affected 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

QuickIODirectoryInfo

Returns

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

QuickIOPathInfo

Returns

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

String

Returns

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 );
}
public static void Move(String from, String to, Boolean overwrite)

Parameters

from

String

Fullname to move

to

String

Full targetname

overwrite

Boolean

true 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

QuickIODirectoryInfo

A directory or file.

attribute

FileAttributes

Attribute 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

QuickIOPathInfo

A directory or file.

attribute

FileAttributes

Attribute 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

String

A directory or file.

attribute

FileAttributes

Attribute to remove

Returns

true if removed. false if not exists in attributes

public static void SetAllFileTimes(QuickIODirectoryInfo info, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime)

Parameters

info

QuickIODirectoryInfo

Affected file or directory

creationTime

DateTime

The time that is to be used

lastAccessTime

DateTime

The time that is to be used

lastWriteTime

DateTime

The time that is to be used

public static void SetAllFileTimes(QuickIOPathInfo info, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime)

Parameters

info

QuickIOPathInfo

Affected file or directory

creationTime

DateTime

The time that is to be used

lastAccessTime

DateTime

The time that is to be used

lastWriteTime

DateTime

The time that is to be used

public static void SetAllFileTimes(String path, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime)

Parameters

path

String

Affected file or directory

creationTime

DateTime

The time that is to be used

lastAccessTime

DateTime

The time that is to be used

lastWriteTime

DateTime

The time that is to be used

public static void SetAllFileTimesUtc(QuickIODirectoryInfo info, DateTime creationTimeUtc, DateTime lastAccessTimeUtc, DateTime lastWriteTimeUtc)

Parameters

info

QuickIODirectoryInfo

Affected file or directory

creationTimeUtc

DateTime

The time that is to be used (UTC)

lastAccessTimeUtc

DateTime

The time that is to be used (UTC)

lastWriteTimeUtc

DateTime

The time that is to be used (UTC)

public static void SetAllFileTimesUtc(QuickIOPathInfo info, DateTime creationTimeUtc, DateTime lastAccessTimeUtc, DateTime lastWriteTimeUtc)

Parameters

info

QuickIOPathInfo

Affected file or directory

creationTimeUtc

DateTime

The time that is to be used (UTC)

lastAccessTimeUtc

DateTime

The time that is to be used (UTC)

lastWriteTimeUtc

DateTime

The time that is to be used (UTC)

public static void SetAllFileTimesUtc(String path, DateTime creationTimeUtc, DateTime lastAccessTimeUtc, DateTime lastWriteTimeUtc)

Parameters

path

String

Affected file or directory

creationTimeUtc

DateTime

The time that is to be used (UTC)

lastAccessTimeUtc

DateTime

The time that is to be used (UTC)

lastWriteTimeUtc

DateTime

The 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

QuickIODirectoryInfo

A directory or file.

attributes

FileAttributes

New 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

QuickIOPathInfo

A directory or file.

attributes

FileAttributes

New 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

String

The path to the directory or file.

attributes

FileAttributes

New 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

QuickIODirectoryInfo

Affected file or directory

creationTime

DateTime

The 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

QuickIOPathInfo

Affected file or directory

creationTime

DateTime

The 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

String

Affected file or directory

creationTime

DateTime

The 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

QuickIODirectoryInfo

Affected file or directory

creationTimeUtc

DateTime

The 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

QuickIOPathInfo

Affected file or directory

creationTimeUtc

DateTime

The 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

String

Affected file or directory

creationTimeUtc

DateTime

The 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

QuickIODirectoryInfo

Affected file or directory

lastAccessTime

DateTime

The 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

QuickIOPathInfo

Affected file or directory

lastAccessTime

DateTime

The 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

String

Affected file or directory

lastAccessTime

DateTime

The 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

QuickIODirectoryInfo

Affected file or directory

lastAccessTimeUtc

DateTime

The 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

QuickIOPathInfo

Affected file or directory

lastAccessTimeUtc

DateTime

The 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

String

Affected file or directory

lastAccessTimeUtc

DateTime

The 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

QuickIODirectoryInfo

Affected file or directory

lastWriteTime

DateTime

The 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

QuickIOPathInfo

Affected file or directory

lastWriteTime

DateTime

The 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

String

Affected file or directory

lastWriteTime

DateTime

The 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

QuickIODirectoryInfo

Affected file or directory

lastWriteTimeUtc

DateTime

The 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

QuickIOPathInfo

Affected file or directory

lastWriteTimeUtc

DateTime

The 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

String

Affected file or directory

lastWriteTimeUtc

DateTime

The time that is to be used (UTC)

Remarks

http://msdn.microsoft.com/en-us/library/system.io.file.setlastwritetimeutc(v=vs.110).aspx

Classdiagram

public static classQuickIODirectoryAddAttributeAddAttributeAddAttributeCopyCopyCreateCreateDeleteDeleteEnumerateDirectoriesEnumerateDirectoriesEnumerateDirectoriesEnumerateDirectoriesAsyncEnumerateDirectoriesAsyncEnumerateDirectoriesAsyncEnumerateDirectoryPathsEnumerateDirectoryPathsEnumerateDirectoryPathsEnumerateDirectoryPathsAsyncEnumerateDirectoryPathsAsyncEnumerateDirectoryPathsAsyncEnumerateFilePathsEnumerateFilePathsEnumerateFilePathsEnumerateFilePathsAsyncEnumerateFilePathsAsyncEnumerateFilePathsAsyncEnumerateFilesEnumerateFilesEnumerateFilesEnumerateFilesAsyncEnumerateFilesAsyncEnumerateFilesAsyncEnumerateFileSystemEntriesEnumerateFileSystemEntriesEnumerateFileSystemEntriesEnumerateFileSystemEntriesAsyncEnumerateFileSystemEntriesAsyncEnumerateFileSystemEntriesAsyncEnumerateFileSystemEntryPathsEnumerateFileSystemEntryPathsEnumerateFileSystemEntryPathsEnumerateFileSystemEntryPathsAsyncEnumerateFileSystemEntryPathsAsyncEnumerateFileSystemEntryPathsAsyncExistsExistsExistsGetAttributesGetAttributesGetAttributesGetCreationTimeGetCreationTimeGetCreationTimeGetCreationTimeUtcGetCreationTimeUtcGetCreationTimeUtcGetLastAccessTimeGetLastAccessTimeGetLastAccessTimeGetLastAccessTimeUtcGetLastAccessTimeUtcGetLastAccessTimeUtcGetLastWriteTimeGetLastWriteTimeGetLastWriteTimeGetLastWriteTimeUtcGetLastWriteTimeUtcGetLastWriteTimeUtcGetMetadastaAsyncGetMetadataGetMetadataGetMetadataGetMetadataAsyncGetMetadataAsyncGetMetadataAsyncGetStatisticsGetStatisticsGetStatisticsMoveRemoveAttributeRemoveAttributeRemoveAttributeSetAllFileTimesSetAllFileTimesSetAllFileTimesSetAllFileTimesUtcSetAllFileTimesUtcSetAllFileTimesUtcSetAttributesSetAttributesSetAttributesSetCreationTimeSetCreationTimeSetCreationTimeSetCreationTimeUtcSetCreationTimeUtcSetCreationTimeUtcSetLastAccessTimeSetLastAccessTimeSetLastAccessTimeSetLastAccessTimeUtcSetLastAccessTimeUtcSetLastAccessTimeUtcSetLastWriteTimeSetLastWriteTimeSetLastWriteTimeSetLastWriteTimeUtcSetLastWriteTimeUtcSetLastWriteTimeUtcpublic static classQuickIOCreateDirectoryCreateFileDeleteDirectoryDeleteDirectoryDeleteDirectoryDeleteFileDeleteFileDeleteFileDirectoryExistsDirectoryExistsEnumerateDirectoriesEnumerateDirectoriesEnumerateDirectoriesEnumerateDirectoryPathsEnumerateDirectoryPathsEnumerateDirectoryPathsEnumerateFilePathsEnumerateFilePathsEnumerateFilePathsEnumerateFilesEnumerateFilesEnumerateFilesFileExistsFileExistspublic classQuickIOTransferDirectoryCopyService_runningDetermineDirectoryTransferPrefencesStartStartAsyncQuickIOTransferDirectoryCopyServiceQuickIOTransferDirectoryCopyServiceIsRunning { get; set; }Overwrite { get; set; }SearchOption { get; set; }SourceDirectoryInfo { get; set; }TargetFullName { get; set; }public classQuickIOTransferDirectoryCreationJobDirectoryCreatedDirectoryCreatingErrorImplementationOnDirectoryCreatedOnDirectoryCreatedOnDirectoryCreatingOnDirectoryCreatingOnErrorQuickIOTransferDirectoryCreationJobQuickIOTransferDirectoryCreationJobDirectoryToCreatePath { get; set; }JobType { get; }public classQuickIOTransferFileCopyJob_copyTimestamps_transferStarted_transferStartedLockDirectoryCreatedDirectoryCreatingErrorFinishedProgressStartedImplementationOnCopyFinishedOnCopyProgressOnCopyStartedOnDirectoryCreatedOnDirectoryCreatingOnErrorQuickIOTransferFileCopyJobQuickIOTransferFileCopyJobCopyAttributes { get; set; }CopyTimestamps { get; set; }JobType { get; }Source { get; set; }Target { get; set; }TransferStarted { get; set; }public classQuickIOTransferFileCreationJob_maxJobRetryAttemptsDirectoryCreatedDirectoryCreatingErrorFinishedProgressStartedImplementationOnCreationFinishedOnCreationProgressOnCreationStartedOnDirectoryCreatedOnDirectoryCreatingOnErrorQuickIOTransferFileCreationJobQuickIOTransferFileCreationJobContents { get; set; }FileName { get; set; }JobType { get; }MaxJobRetryAttempts { get; set; }TargetDirectory { get; set; }TargetFullName { get; set; }TransferStarted { get; set; }public static classQuickIOFileAddAttributeAddAttributeAddAttributeAppendAllLinesAppendAllLinesAppendAllLinesAppendAllLinesAppendAllTextAppendAllTextAppendAllTextAppendAllTextCalculateHashCalculateHashCalculateMD5HashCalculateSha1HashCalculateSha256HashCalculateSha384HashCalculateSha512HashCopyCopyToDirectoryCopyToDirectoryCreateCreateCreateCreateCreateTextCreateTextDeleteDeleteExistsExistsGetAttributesGetAttributesGetAttributesGetCreationTimeGetCreationTimeGetCreationTimeGetCreationTimeUtcGetCreationTimeUtcGetCreationTimeUtcGetDirectoryRootGetDirectoryRootGetDirectoryRootGetLastAccessTimeGetLastAccessTimeGetLastAccessTimeGetLastAccessTimeUtcGetLastAccessTimeUtcGetLastAccessTimeUtcGetLastWriteTimeGetLastWriteTimeGetLastWriteTimeGetLastWriteTimeUtcGetLastWriteTimeUtcGetLastWriteTimeUtcMoveMoveMoveOpenOpenOpenOpenOpenOpenOpenAppendOpenAppendOpenAppendFileStreamOpenFileStreamOpenReadOpenReadOpenTextOpenTextOpenWriteOpenWriteReadAllBytesReadAllBytesReadAllLinesReadAllLinesReadAllLinesReadAllLinesReadAllTextReadAllTextReadAllTextReadAllTextRemoveAttributeRemoveAttributeRemoveAttributeSetAllFileTimesSetAllFileTimesSetAllFileTimesSetAllFileTimesUtcSetAllFileTimesUtcSetAllFileTimesUtcSetAttributesSetAttributesSetAttributesSetCreationTimeSetCreationTimeSetCreationTimeSetCreationTimeUtcSetCreationTimeUtcSetCreationTimeUtcSetLastAccessTimeSetLastAccessTimeSetLastAccessTimeSetLastAccessTimeUtcSetLastAccessTimeUtcSetLastAccessTimeUtcSetLastWriteTimeSetLastWriteTimeSetLastWriteTimeSetLastWriteTimeUtcSetLastWriteTimeUtcSetLastWriteTimeUtcWriteAllBytesWriteAllBytesWriteAllBytesWriteAllBytesWriteAllLinesWriteAllLinesWriteAllLinesWriteAllLinesWriteAllTextWriteAllTextWriteAllTextWriteAllText

save

reset

Drag to pan - Use Mousewheel + Ctrl to zoom