Methods (24)
Namespace: SchwabenCode.QuickIO

Syntax

public static class QuickIO

Summary

Provides static methods for files and directories.

Uses

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.

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

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.

EnumerateDirectories(QuickIODirectoryInfo directoryInfo, 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, SearchOption searchOption)

Parameters

directoryInfo

QuickIODirectoryInfo

Rootpath

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, 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, SearchOption searchOption)

Parameters

pathInfo

QuickIOPathInfo

Rootpath

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, 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, SearchOption searchOption)

Parameters

path

String

Rootpath

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, 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, SearchOption searchOption)

Parameters

directoryInfo

QuickIODirectoryInfo

Rootpath

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, 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, SearchOption searchOption)

Parameters

pathInfo

QuickIOPathInfo

Rootpath

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, 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, SearchOption searchOption)

Parameters

path

String

Rootpath

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, 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, SearchOption searchOption)

Parameters

directoryInfo

QuickIODirectoryInfo

Rootpath

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, 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, SearchOption searchOption)

Parameters

path

QuickIOPathInfo

Rootpath

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, 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, SearchOption searchOption)

Parameters

path

String

Rootpath

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, 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, SearchOption searchOption)

Parameters

directoryInfo

QuickIODirectoryInfo

Rootpath

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, 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, SearchOption searchOption)

Parameters

pathInfo

QuickIOPathInfo

Rootpath

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, 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, SearchOption searchOption)

Parameters

path

String

Rootpath

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.

Classdiagram

public static classQuickIOCreateDirectoryCreateFileDeleteDirectoryDeleteDirectoryDeleteDirectoryDeleteFileDeleteFileDeleteFileDirectoryExistsDirectoryExistsEnumerateDirectoriesEnumerateDirectoriesEnumerateDirectoriesEnumerateDirectoryPathsEnumerateDirectoryPathsEnumerateDirectoryPathsEnumerateFilePathsEnumerateFilePathsEnumerateFilePathsEnumerateFilesEnumerateFilesEnumerateFilesFileExistsFileExistspublic static classQuickIODirectoryAddAttributeAddAttributeAddAttributeCopyCopyCreateCreateDeleteDeleteEnumerateDirectoriesEnumerateDirectoriesEnumerateDirectoriesEnumerateDirectoriesAsyncEnumerateDirectoriesAsyncEnumerateDirectoriesAsyncEnumerateDirectoryPathsEnumerateDirectoryPathsEnumerateDirectoryPathsEnumerateDirectoryPathsAsyncEnumerateDirectoryPathsAsyncEnumerateDirectoryPathsAsyncEnumerateFilePathsEnumerateFilePathsEnumerateFilePathsEnumerateFilePathsAsyncEnumerateFilePathsAsyncEnumerateFilePathsAsyncEnumerateFilesEnumerateFilesEnumerateFilesEnumerateFilesAsyncEnumerateFilesAsyncEnumerateFilesAsyncEnumerateFileSystemEntriesEnumerateFileSystemEntriesEnumerateFileSystemEntriesEnumerateFileSystemEntriesAsyncEnumerateFileSystemEntriesAsyncEnumerateFileSystemEntriesAsyncEnumerateFileSystemEntryPathsEnumerateFileSystemEntryPathsEnumerateFileSystemEntryPathsEnumerateFileSystemEntryPathsAsyncEnumerateFileSystemEntryPathsAsyncEnumerateFileSystemEntryPathsAsyncExistsExistsExistsGetAttributesGetAttributesGetAttributesGetCreationTimeGetCreationTimeGetCreationTimeGetCreationTimeUtcGetCreationTimeUtcGetCreationTimeUtcGetLastAccessTimeGetLastAccessTimeGetLastAccessTimeGetLastAccessTimeUtcGetLastAccessTimeUtcGetLastAccessTimeUtcGetLastWriteTimeGetLastWriteTimeGetLastWriteTimeGetLastWriteTimeUtcGetLastWriteTimeUtcGetLastWriteTimeUtcGetMetadastaAsyncGetMetadataGetMetadataGetMetadataGetMetadataAsyncGetMetadataAsyncGetMetadataAsyncGetStatisticsGetStatisticsGetStatisticsMoveRemoveAttributeRemoveAttributeRemoveAttributeSetAllFileTimesSetAllFileTimesSetAllFileTimesSetAllFileTimesUtcSetAllFileTimesUtcSetAllFileTimesUtcSetAttributesSetAttributesSetAttributesSetCreationTimeSetCreationTimeSetCreationTimeSetCreationTimeUtcSetCreationTimeUtcSetCreationTimeUtcSetLastAccessTimeSetLastAccessTimeSetLastAccessTimeSetLastAccessTimeUtcSetLastAccessTimeUtcSetLastAccessTimeUtcSetLastWriteTimeSetLastWriteTimeSetLastWriteTimeSetLastWriteTimeUtcSetLastWriteTimeUtcSetLastWriteTimeUtcpublic static classQuickIOFileAddAttributeAddAttributeAddAttributeAppendAllLinesAppendAllLinesAppendAllLinesAppendAllLinesAppendAllTextAppendAllTextAppendAllTextAppendAllTextCalculateHashCalculateHashCalculateMD5HashCalculateSha1HashCalculateSha256HashCalculateSha384HashCalculateSha512HashCopyCopyToDirectoryCopyToDirectoryCreateCreateCreateCreateCreateTextCreateTextDeleteDeleteExistsExistsGetAttributesGetAttributesGetAttributesGetCreationTimeGetCreationTimeGetCreationTimeGetCreationTimeUtcGetCreationTimeUtcGetCreationTimeUtcGetDirectoryRootGetDirectoryRootGetDirectoryRootGetLastAccessTimeGetLastAccessTimeGetLastAccessTimeGetLastAccessTimeUtcGetLastAccessTimeUtcGetLastAccessTimeUtcGetLastWriteTimeGetLastWriteTimeGetLastWriteTimeGetLastWriteTimeUtcGetLastWriteTimeUtcGetLastWriteTimeUtcMoveMoveMoveOpenOpenOpenOpenOpenOpenOpenAppendOpenAppendOpenAppendFileStreamOpenFileStreamOpenReadOpenReadOpenTextOpenTextOpenWriteOpenWriteReadAllBytesReadAllBytesReadAllLinesReadAllLinesReadAllLinesReadAllLinesReadAllTextReadAllTextReadAllTextReadAllTextRemoveAttributeRemoveAttributeRemoveAttributeSetAllFileTimesSetAllFileTimesSetAllFileTimesSetAllFileTimesUtcSetAllFileTimesUtcSetAllFileTimesUtcSetAttributesSetAttributesSetAttributesSetCreationTimeSetCreationTimeSetCreationTimeSetCreationTimeUtcSetCreationTimeUtcSetCreationTimeUtcSetLastAccessTimeSetLastAccessTimeSetLastAccessTimeSetLastAccessTimeUtcSetLastAccessTimeUtcSetLastAccessTimeUtcSetLastWriteTimeSetLastWriteTimeSetLastWriteTimeSetLastWriteTimeUtcSetLastWriteTimeUtcSetLastWriteTimeUtcWriteAllBytesWriteAllBytesWriteAllBytesWriteAllBytesWriteAllLinesWriteAllLinesWriteAllLinesWriteAllLinesWriteAllTextWriteAllTextWriteAllTextWriteAllText

save

reset

Drag to pan - Use Mousewheel + Ctrl to zoom