Methods (50)
Namespace: SchwabenCode.QuickIO

Syntax

public static class QuickIO

Summary

Provides static methods for files and directories.

Methods

CreateDirectory(String fullName, Boolean recursive)

Creates a new directory. If recursive is false, the parent directory must exist.

public static void CreateDirectory(String fullName, Boolean recursive)

Parameters

fullName

String

The path to the directory.

recursive

Boolean

If recursive is false, the parent directory must exist.

Exceptions

PathAlreadyExistsException

Path already exists.

DirectoryNotEmptyException

The directory is not empty.

CreateDirectoryAsync(String fullName, Boolean recursive)

Creates a new directory. If recursive is false, the parent directory must exist.

public static Task CreateDirectoryAsync(String fullName, Boolean recursive)

Parameters

fullName

String

The path to the directory.

recursive

Boolean

If recursive is false, the parent directory must exist.

Exceptions

PathAlreadyExistsException

Path already exists.

DirectoryNotEmptyException

The directory is not empty.

public static void CreateFile(String fullName, FileAccess fileAccess, FileShare fileShare, FileMode fileMode, FileAttributes fileAttributes)

Parameters

fullName

String

The path to the file.

fileAccess

FileAccess

FileAccess - default Write

fileShare

FileShare
  • default None

fileMode

FileMode

FileMode - default Create

fileAttributes

FileAttributes

FileAttributes - default 0 (none)

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.

public static Task CreateFileAsync(String fullName, FileAccess fileAccess, FileShare fileShare, FileMode fileMode, FileAttributes fileAttributes)

Parameters

fullName

String

The path to the file.

fileAccess

FileAccess

FileAccess - default Write

fileShare

FileShare
  • default None

fileMode

FileMode

FileMode - default Create

fileAttributes

FileAttributes

FileAttributes - default 0 (none)

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.

public static void DeleteDirectory(QuickIODirectoryInfo directoryInfo)

Parameters

directoryInfo

QuickIODirectoryInfo

The directory.

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.

public static void DeleteDirectory(QuickIOPathInfo pathInfo)

Parameters

pathInfo

QuickIOPathInfo

The path of the directory.

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.

DeleteDirectory(String fullName)

Removes a directory.

public static void DeleteDirectory(String fullName)

Parameters

fullName

String

The path to the directory.

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.

public static Task DeleteDirectoryAsync(QuickIODirectoryInfo directoryInfo)

Parameters

directoryInfo

QuickIODirectoryInfo

The directory.

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.

public static Task DeleteDirectoryAsync(QuickIOPathInfo pathInfo)

Parameters

pathInfo

QuickIOPathInfo

The path of the directory.

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.

public static Task DeleteDirectoryAsync(String fullName)

Parameters

fullName

String

The path to the directory.

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.

public static void DeleteFile(QuickIOFileInfo file)

Parameters

file

QuickIOFileInfo

The file.

Exceptions

PathNotFoundException

One or more intermediate directories do not exist; this function will only create the final directory in the path.

FileNotFoundException

File does not exist.

public static void DeleteFile(QuickIOPathInfo pathInfo)

Parameters

pathInfo

QuickIOPathInfo

The file.

Exceptions

PathNotFoundException

One or more intermediate directories do not exist; this function will only create the final directory in the path.

FileNotFoundException

File does not exist.

public static void DeleteFile(String fullName)

Parameters

fullName

String

The path to the file.

Exceptions

PathNotFoundException

One or more intermediate directories do not exist; this function will only create the final directory in the path.

FileNotFoundException

File does not exist.

public static Task DeleteFileAsync(QuickIOFileInfo file)

Parameters

file

QuickIOFileInfo

The file.

Exceptions

PathNotFoundException

One or more intermediate directories do not exist; this function will only create the final directory in the path.

FileNotFoundException

File does not exist.

public static Task DeleteFileAsync(QuickIOPathInfo pathInfo)

Parameters

pathInfo

QuickIOPathInfo

The file.

Exceptions

PathNotFoundException

One or more intermediate directories do not exist; this function will only create the final directory in the path.

FileNotFoundException

File does not exist.

public static Task DeleteFileAsync(String fullName)

Parameters

fullName

String

The path to the file.

Exceptions

PathNotFoundException

One or more intermediate directories do not exist; this function will only create the final directory in the path.

FileNotFoundException

File does not exist.

DirectoryExists(QuickIOPathInfo pathInfo)

Checks whether a directory exists

public static Boolean DirectoryExists(QuickIOPathInfo pathInfo)

Parameters

pathInfo

QuickIOPathInfo

Directory path to verify

Exceptions

UnmatchedFileSystemEntryTypeException

Searched for directory but found file.

InvalidPathException

Path is invalid.

DirectoryExists(String path)

Checks whether a directory exists

public static Boolean DirectoryExists(String path)

Parameters

path

String

Directory path to verify

Exceptions

UnmatchedFileSystemEntryTypeException

Searched for directory but found file.

InvalidPathException

Path is invalid.

DirectoryExistsAsync(QuickIOPathInfo pathInfo)

Checks whether a directory exists

public static Task<Boolean> DirectoryExistsAsync(QuickIOPathInfo pathInfo)

Parameters

pathInfo

QuickIOPathInfo

Directory path to verify

Exceptions

UnmatchedFileSystemEntryTypeException

Searched for directory but found file.

InvalidPathException

Path is invalid.

DirectoryExistsAsync(String path)

Checks whether a directory exists

public static Task<Boolean> DirectoryExistsAsync(String path)

Parameters

path

String

Directory path to verify

Exceptions

UnmatchedFileSystemEntryTypeException

Searched for directory but found file.

InvalidPathException

Path is invalid.

EnumerateDirectories(QuickIODirectoryInfo directoryInfo, String pattern, SearchOption searchOption)

Returns a directory list from the current directory using a value to determine whether to search subdirectories.

public static IEnumerable<QuickIODirectoryInfo> EnumerateDirectories(QuickIODirectoryInfo directoryInfo, String pattern, SearchOption searchOption)

Parameters

directoryInfo

QuickIODirectoryInfo

Rootpath

pattern

String

Search pattern. Uses Win32 native filtering.

searchOption

SearchOption

One of the enumeration values that specifies whether the search operation should include only the current directory or all subdirectories.

Returns

Returns a directory list from the current directory

EnumerateDirectories(QuickIOPathInfo pathInfo, String pattern, SearchOption searchOption)

Returns a directory list from the current directory using a value to determine whether to search subdirectories.

public static IEnumerable<QuickIODirectoryInfo> EnumerateDirectories(QuickIOPathInfo pathInfo, String pattern, SearchOption searchOption)

Parameters

pathInfo

QuickIOPathInfo

Rootpath

pattern

String

Search pattern. Uses Win32 native filtering.

searchOption

SearchOption

One of the enumeration values that specifies whether the search operation should include only the current directory or all subdirectories.

Returns

Returns a directory list from the current directory

EnumerateDirectories(String path, String pattern, SearchOption searchOption)

Returns a directory list from the current directory using a value to determine whether to search subdirectories.

public static IEnumerable<QuickIODirectoryInfo> EnumerateDirectories(String path, String pattern, SearchOption searchOption)

Parameters

path

String

Rootpath

pattern

String

Search pattern. Uses Win32 native filtering.

searchOption

SearchOption

One of the enumeration values that specifies whether the search operation should include only the current directory or all subdirectories.

Returns

Returns a directory list from the current directory

EnumerateDirectoriesAsync(QuickIODirectoryInfo directoryInfo, String pattern, SearchOption searchOption)

Returns a directory list from the current directory using a value to determine whether to search subdirectories.

public static Task<IEnumerable<QuickIOFileInfo>> EnumerateDirectoriesAsync(QuickIODirectoryInfo directoryInfo, String pattern, SearchOption searchOption)

Parameters

directoryInfo

QuickIODirectoryInfo

Rootpath

pattern

String

Search pattern. Uses Win32 native filtering.

searchOption

SearchOption

One of the enumeration values that specifies whether the search operation should include only the current directory or all subdirectories.

Returns

Returns a directory list from the current directory

EnumerateDirectoriesAsync(QuickIOPathInfo pathInfo, String pattern, SearchOption searchOption)

Returns a directory list from the current directory using a value to determine whether to search subdirectories.

public static Task<IEnumerable<QuickIOFileInfo>> EnumerateDirectoriesAsync(QuickIOPathInfo pathInfo, String pattern, SearchOption searchOption)

Parameters

pathInfo

QuickIOPathInfo

Rootpath

pattern

String

Search pattern. Uses Win32 native filtering.

searchOption

SearchOption

One of the enumeration values that specifies whether the search operation should include only the current directory or all subdirectories.

Returns

Returns a directory list from the current directory

EnumerateDirectoriesAsync(String path, String pattern, SearchOption searchOption)

Returns a directory list from the current directory using a value to determine whether to search subdirectories.

public static Task<IEnumerable<QuickIOFileInfo>> EnumerateDirectoriesAsync(String path, String pattern, SearchOption searchOption)

Parameters

path

String

Rootpath

pattern

String

Search pattern. Uses Win32 native filtering.

searchOption

SearchOption

One of the enumeration values that specifies whether the search operation should include only the current directory or all subdirectories.

Returns

Returns a directory list from the current directory

EnumerateDirectoryPaths(QuickIODirectoryInfo directoryInfo, String pattern, SearchOption searchOption)

Returns a directory path list from the current directory using a value to determine whether to search subdirectories.

public static IEnumerable<String> EnumerateDirectoryPaths(QuickIODirectoryInfo directoryInfo, String pattern, SearchOption searchOption)

Parameters

directoryInfo

QuickIODirectoryInfo

Rootpath

pattern

String

Search pattern. Uses Win32 native filtering.

searchOption

SearchOption

One of the enumeration values that specifies whether the search operation should include only the current directory or all subdirectories.

Returns

Returns a directory path list from the current directory

EnumerateDirectoryPaths(QuickIOPathInfo pathInfo, String pattern, SearchOption searchOption)

Returns a directory path list from the current directory using a value to determine whether to search subdirectories.

public static IEnumerable<String> EnumerateDirectoryPaths(QuickIOPathInfo pathInfo, String pattern, SearchOption searchOption)

Parameters

pathInfo

QuickIOPathInfo

Rootpath

pattern

String

Search pattern. Uses Win32 native filtering.

searchOption

SearchOption

One of the enumeration values that specifies whether the search operation should include only the current directory or all subdirectories.

Returns

Returns a directory path list from the current directory

EnumerateDirectoryPaths(String path, String pattern, SearchOption searchOption)

Returns a directory path list from the current directory using a value to determine whether to search subdirectories.

public static IEnumerable<String> EnumerateDirectoryPaths(String path, String pattern, SearchOption searchOption)

Parameters

path

String

Rootpath

pattern

String

Search pattern. Uses Win32 native filtering.

searchOption

SearchOption

One of the enumeration values that specifies whether the search operation should include only the current directory or all subdirectories.

Returns

Returns a directory path list from the current directory

EnumerateDirectoryPathsAsync(QuickIODirectoryInfo directoryInfo, String pattern, SearchOption searchOption)

Returns a directory path list from the current directory using a value to determine whether to search subdirectories.

public static Task<IEnumerable<QuickIOFileInfo>> EnumerateDirectoryPathsAsync(QuickIODirectoryInfo directoryInfo, String pattern, SearchOption searchOption)

Parameters

directoryInfo

QuickIODirectoryInfo

Rootpath

pattern

String

Search pattern. Uses Win32 native filtering.

searchOption

SearchOption

One of the enumeration values that specifies whether the search operation should include only the current directory or all subdirectories.

Returns

Returns a directory path list from the current directory

EnumerateDirectoryPathsAsync(QuickIOPathInfo pathInfo, String pattern, SearchOption searchOption)

Returns a directory path list from the current directory using a value to determine whether to search subdirectories.

public static Task<IEnumerable<QuickIOFileInfo>> EnumerateDirectoryPathsAsync(QuickIOPathInfo pathInfo, String pattern, SearchOption searchOption)

Parameters

pathInfo

QuickIOPathInfo

Rootpath

pattern

String

Search pattern. Uses Win32 native filtering.

searchOption

SearchOption

One of the enumeration values that specifies whether the search operation should include only the current directory or all subdirectories.

Returns

Returns a directory path list from the current directory

EnumerateDirectoryPathsAsync(String path, String pattern, SearchOption searchOption)

Returns a directory path list from the current directory using a value to determine whether to search subdirectories.

public static Task<IEnumerable<QuickIOFileInfo>> EnumerateDirectoryPathsAsync(String path, String pattern, SearchOption searchOption)

Parameters

path

String

Rootpath

pattern

String

Search pattern. Uses Win32 native filtering.

searchOption

SearchOption

One of the enumeration values that specifies whether the search operation should include only the current directory or all subdirectories.

Returns

Returns a directory path list from the current directory

EnumerateFilePaths(QuickIODirectoryInfo directoryInfo, String pattern, SearchOption searchOption)

Returns a file path list from the current directory using a value to determine whether to search subdirectories.

public static IEnumerable<String> EnumerateFilePaths(QuickIODirectoryInfo directoryInfo, String pattern, SearchOption searchOption)

Parameters

directoryInfo

QuickIODirectoryInfo

Rootpath

pattern

String

Search pattern. Uses Win32 native filtering.

searchOption

SearchOption

One of the enumeration values that specifies whether the search operation should include only the current directory or all subdirectories.

Returns

Returns a file path list from the current directory

EnumerateFilePaths(QuickIOPathInfo path, String pattern, SearchOption searchOption)

Returns a file path list from the current directory using a value to determine whether to search subdirectories.

public static IEnumerable<String> EnumerateFilePaths(QuickIOPathInfo path, String pattern, SearchOption searchOption)

Parameters

path

QuickIOPathInfo

Rootpath

pattern

String

Search pattern. Uses Win32 native filtering.

searchOption

SearchOption

One of the enumeration values that specifies whether the search operation should include only the current directory or all subdirectories.

Returns

Returns a file path list from the current directory

EnumerateFilePaths(String path, String pattern, SearchOption searchOption)

Returns a file path list from the current directory using a value to determine whether to search subdirectories.

public static IEnumerable<String> EnumerateFilePaths(String path, String pattern, SearchOption searchOption)

Parameters

path

String

Rootpath

pattern

String

Search pattern. Uses Win32 native filtering.

searchOption

SearchOption

One of the enumeration values that specifies whether the search operation should include only the current directory or all subdirectories.

Returns

Returns a file path list from the current directory

EnumerateFilePathsAsync(QuickIODirectoryInfo directoryInfo, String pattern, SearchOption searchOption)

Returns a file path list from the current directory using a value to determine whether to search subdirectories.

public static Task<IEnumerable<QuickIOFileInfo>> EnumerateFilePathsAsync(QuickIODirectoryInfo directoryInfo, String pattern, SearchOption searchOption)

Parameters

directoryInfo

QuickIODirectoryInfo

Rootpath

pattern

String

Search pattern. Uses Win32 native filtering.

searchOption

SearchOption

One of the enumeration values that specifies whether the search operation should include only the current directory or all subdirectories.

Returns

Returns a file path list from the current directory

EnumerateFilePathsAsync(QuickIOPathInfo path, String pattern, SearchOption searchOption)

Returns a file path list from the current directory using a value to determine whether to search subdirectories.

public static Task<IEnumerable<QuickIOFileInfo>> EnumerateFilePathsAsync(QuickIOPathInfo path, String pattern, SearchOption searchOption)

Parameters

path

QuickIOPathInfo

Rootpath

pattern

String

Search pattern. Uses Win32 native filtering.

searchOption

SearchOption

One of the enumeration values that specifies whether the search operation should include only the current directory or all subdirectories.

Returns

Returns a file path list from the current directory

EnumerateFilePathsAsync(String path, String pattern, SearchOption searchOption)

Returns a file path list from the current directory using a value to determine whether to search subdirectories.

public static Task<IEnumerable<QuickIOFileInfo>> EnumerateFilePathsAsync(String path, String pattern, SearchOption searchOption)

Parameters

path

String

Rootpath

pattern

String

Search pattern. Uses Win32 native filtering.

searchOption

SearchOption

One of the enumeration values that specifies whether the search operation should include only the current directory or all subdirectories.

Returns

Returns a file path list from the current directory

EnumerateFiles(QuickIODirectoryInfo directoryInfo, String pattern, SearchOption searchOption)

Returns a file list from the current directory using a value to determine whether to search subdirectories.

public static IEnumerable<QuickIOFileInfo> EnumerateFiles(QuickIODirectoryInfo directoryInfo, String pattern, SearchOption searchOption)

Parameters

directoryInfo

QuickIODirectoryInfo

Rootpath

pattern

String

Search pattern. Uses Win32 native filtering.

searchOption

SearchOption

One of the enumeration values that specifies whether the search operation should include only the current directory or all subdirectories.

Returns

Returns a file list from the current directory

EnumerateFiles(QuickIOPathInfo pathInfo, String pattern, SearchOption searchOption)

Returns a file list from the current directory using a value to determine whether to search subdirectories.

public static IEnumerable<QuickIOFileInfo> EnumerateFiles(QuickIOPathInfo pathInfo, String pattern, SearchOption searchOption)

Parameters

pathInfo

QuickIOPathInfo

Rootpath

pattern

String

Search pattern. Uses Win32 native filtering.

searchOption

SearchOption

One of the enumeration values that specifies whether the search operation should include only the current directory or all subdirectories.

Returns

Returns a file list from the current directory

EnumerateFiles(String path, String pattern, SearchOption searchOption)

Returns a file list from the current directory using a value to determine whether to search subdirectories.

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

Parameters

path

String

Rootpath

pattern

String

Search pattern. Uses Win32 native filtering.

searchOption

SearchOption

One of the enumeration values that specifies whether the search operation should include only the current directory or all subdirectories.

Returns

Returns a file list from the current directory

EnumerateFilesAsync(QuickIODirectoryInfo directoryInfo, String pattern, SearchOption searchOption)

Returns a file list from the current directory using a value to determine whether to search subdirectories.

public static Task<IEnumerable<QuickIOFileInfo>> EnumerateFilesAsync(QuickIODirectoryInfo directoryInfo, String pattern, SearchOption searchOption)

Parameters

directoryInfo

QuickIODirectoryInfo

Rootpath

pattern

String

Search pattern. Uses Win32 native filtering.

searchOption

SearchOption

One of the enumeration values that specifies whether the search operation should include only the current directory or all subdirectories.

Returns

Returns a file list from the current directory

EnumerateFilesAsync(QuickIOPathInfo pathInfo, String pattern, SearchOption searchOption)

Returns a file list from the current directory using a value to determine whether to search subdirectories.

public static Task<IEnumerable<QuickIOFileInfo>> EnumerateFilesAsync(QuickIOPathInfo pathInfo, String pattern, SearchOption searchOption)

Parameters

pathInfo

QuickIOPathInfo

Rootpath

pattern

String

Search pattern. Uses Win32 native filtering.

searchOption

SearchOption

One of the enumeration values that specifies whether the search operation should include only the current directory or all subdirectories.

Returns

Returns a file list from the current directory

EnumerateFilesAsync(String path, String pattern, SearchOption searchOption)

Returns a file list from the current directory using a value to determine whether to search subdirectories.

public static Task<IEnumerable<QuickIOFileInfo>> EnumerateFilesAsync(String path, String pattern, SearchOption searchOption)

Parameters

path

String

Rootpath

pattern

String

Search pattern. Uses Win32 native filtering.

searchOption

SearchOption

One of the enumeration values that specifies whether the search operation should include only the current directory or all subdirectories.

Returns

Returns a file list from the current directory

FileExists(QuickIOPathInfo pathInfo)

Checks whether a file exists

public static Boolean FileExists(QuickIOPathInfo pathInfo)

Parameters

pathInfo

QuickIOPathInfo

File path to check

Exceptions

UnmatchedFileSystemEntryTypeException

Searched for file but found folder.

InvalidPathException

Path is invalid.

FileExists(String path)

Checks whether a file exists

public static Boolean FileExists(String path)

Parameters

path

String

File path to check

Exceptions

UnmatchedFileSystemEntryTypeException

Searched for file but found folder.

InvalidPathException

Path is invalid.

FileExistsAsync(QuickIOPathInfo pathInfo)

Checks whether a file exists

public static Task<Boolean> FileExistsAsync(QuickIOPathInfo pathInfo)

Parameters

pathInfo

QuickIOPathInfo

File path to check

Exceptions

UnmatchedFileSystemEntryTypeException

Searched for file but found folder.

InvalidPathException

Path is invalid.

FileExistsAsync(String path)

Checks whether a file exists

public static Task<Boolean> FileExistsAsync(String path)

Parameters

path

String

File path to check

Exceptions

UnmatchedFileSystemEntryTypeException

Searched for file but found folder.

InvalidPathException

Path is invalid.

GetDiskInformation(String path)

Receives QuickIODiskInformation of specifies path

public static QuickIODiskInformation GetDiskInformation(String path)

Returns

QuickIODiskInformation

Remarks

See http://support.microsoft.com/kb/231497

GetDiskInformationAsync(String path)

Receives QuickIODiskInformation of specifies path

public static Task<QuickIODiskInformation> GetDiskInformationAsync(String path)

Returns

QuickIODiskInformation

Remarks

See http://support.microsoft.com/kb/231497