Methods (38) Properties (3)
Namespace: SchwabenCode.QuickIO

Syntax

public class QuickIOFileInfo : QuickIOFileSystemEntryBase

Basetype

Summary

Provides properties and instance methods for files

Used by

Methods

QuickIOFileInfo(QuickIOPathInfo pathInfo)

Create new instance of QuickIOFileInfo

public void QuickIOFileInfo(QuickIOPathInfo pathInfo)

QuickIOFileInfo(QuickIOPathInfo pathInfo, Win32FindData win32FindData)

Creates the file information on the basis of the path and Win32FindData

internal void QuickIOFileInfo(QuickIOPathInfo pathInfo, Win32FindData win32FindData)

Parameters

pathInfo

QuickIOPathInfo

Full path to the file

win32FindData

Win32FindData

Win32FindData

QuickIOFileInfo(String path)

Create new instance of QuickIOFileInfo

public void QuickIOFileInfo(String path)

QuickIOFileInfo(String fullName, Win32FindData win32FindData)

Creates the file information on the basis of the path and Win32FindData

internal void QuickIOFileInfo(String fullName, Win32FindData win32FindData)

Parameters

fullName

String

Full path to the file

win32FindData

Win32FindData

Win32FindData

AppendAllLines(IEnumerable contents)

Appends lines to a file. Uses UTF-8 Encoding.

public void AppendAllLines(IEnumerable contents)

Parameters

contents

IEnumerable

The lines to append.

AppendAllLines(IEnumerable contents, Encoding encoding)

Appends lines by using the specified encoding. If the file does not exist, it creates the file.

public void AppendAllLines(IEnumerable contents, Encoding encoding)

Parameters

contents

IEnumerable

The lines to append.

encoding

Encoding

The character encoding.

AppendAllText(String contents)

Appends the specified string. If the file does not exist, it creates the file. Uses UTF-8 Encoding.

public void AppendAllText(String contents)

Parameters

contents

String

The string to append to the file.

Remarks

http://msdn.microsoft.com/en-us/library/ms143356(v=vs.110).aspx

AppendAllText(String contents, Encoding encoding)

Appends the specified string. If the file does not exist, it creates the file.

public void AppendAllText(String contents, Encoding encoding)

Parameters

contents

String

The string to append to the file.

encoding

Encoding

The character encoding.

Remarks

http://msdn.microsoft.com/en-us/library/ms143356(v=vs.110).aspx

AsFileInfo()

Returns a FileInfo of the current path of this file

public FileInfo AsFileInfo()

Returns

DirectoryInfo

public QuickIOHashResult CalculateHash(QuickIOHashImplementationType hashImplementationType)

CalculateHash(HashAlgorithm hashAlgorithm)

File content hash calculation

public QuickIOHashResult CalculateHash(HashAlgorithm hashAlgorithm)

Returns

QuickIOHashResult

CalculateMD5Hash()

File content hash calculation using MD5

public QuickIOHashResult CalculateMD5Hash()

Returns

QuickIOHashResult

CalculateSha1Hash()

File content hash calculation using SHA1

public QuickIOHashResult CalculateSha1Hash()

Returns

QuickIOHashResult

CalculateSha256Hash()

File content hash calculation using SHA256

public QuickIOHashResult CalculateSha256Hash()

Returns

QuickIOHashResult

CalculateSha384Hash()

File content hash calculation using SHA384

public QuickIOHashResult CalculateSha384Hash()

Returns

QuickIOHashResult

CalculateSha512Hash()

File content hash calculation using SHA512

public QuickIOHashResult CalculateSha512Hash()

Returns

QuickIOHashResult

CalculateSize(Win32FindData win32FindData)

Calculates the size of the file from the handle

private void CalculateSize(Win32FindData win32FindData)

Parameters

win32FindData

Win32FindData

GetMetadata()

Receives QuickIOFileMetadata of current file

public QuickIOFileMetadata GetMetadata()

Returns

QuickIOFileMetadata

public static QuickIOFileInfo op_Explicit(FileInfo fileInfo)

Parameters

fileInfo

FileInfo

FileInfo

Returns

QuickIOFileInfo

Open(FileMode mode)

Opens a FileStream

public FileStream Open(FileMode mode)

Parameters

mode

FileMode

FileMode

Returns

A FileStream with read and write access and not shared.

public FileStream Open(FileMode mode, FileAccess access)

Parameters

mode

FileMode

FileMode

access

FileAccess

FileAccess

Returns

An unshared FileStream

public FileStream Open(FileMode mode, FileAccess access, FileShare share)

Parameters

mode

FileMode

FileMode

access

FileAccess

FileAccess

share

FileShare

FileShare

Returns

FileStream

Remarks

http://msdn.microsoft.com/en-us/library/y973b725(v=vs.110).aspx

OpenAppend()

Opens an existing file or creates a new file for appending.

public FileStream OpenAppend()

Returns

An unshared FileStream with Write access.

OpenRead()

Opens an existing file for reading.

public FileStream OpenRead()

Returns

A read-only FileStream on the specified path.

OpenText()

Opens an existing UTF-8 encoded text file for reading.

public StreamReader OpenText()

Returns

A StreamReader.

OpenWrite()

Opens an existing file or creates a new file for writing.

public FileStream OpenWrite()

Returns

An unshared FileStream with Write access.

ReadAllBytes()

Reads the contents of the file into a byte collection.

public Byte[] ReadAllBytes()

Returns

A byte collection containing the contents.

ReadAllLines()

Reads all lines.

public IEnumerable<String> ReadAllLines()

Returns

A string collection containing all lines.

ReadAllLines(Encoding encoding)

Reads all lines with the specified encoding

public IEnumerable<String> ReadAllLines(Encoding encoding)

Parameters

encoding

Encoding

The encoding applied to the contents.

Returns

A string collection containing all lines.

ReadAllText()

Reads all text.

public String ReadAllText()

Returns

A string represents the content.

ReadAllText(Encoding encoding)

Reads all text with the specified encoding.

public String ReadAllText(Encoding encoding)

Parameters

encoding

Encoding

The encoding applied to the content.

Returns

A string represents the content.

RetriveDateTimeInformation(Win32FindData win32FindData)

Determines the time stamp of the given Win32FindData

private void RetriveDateTimeInformation(Win32FindData win32FindData)

Parameters

win32FindData

Win32FindData

Win32FindData

WriteAllBytes(Byte[] bytes)

Writes the specified byte array.

public void WriteAllBytes(Byte[] bytes)

Parameters

bytes

Byte[]

The bytes to write.

WriteAllBytes(IEnumerable bytes)

Writes the specified byte array.

public void WriteAllBytes(IEnumerable bytes)

Parameters

bytes

IEnumerable

The bytes to write.

WriteAllLines(IEnumerable contents)

Writes a collection of strings. Uses UTF-8 without Emitted UTF-8 identifier.

public void WriteAllLines(IEnumerable contents)

Parameters

contents

IEnumerable

The lines write to.

public void WriteAllLines(IEnumerable contents, Encoding encoding)

Parameters

contents

IEnumerable

The lines write to.

encoding

Encoding

The character encoding to use.

WriteAllText(String contents)

Writes the specified string.

public void WriteAllText(String contents)

Parameters

contents

String

The string to write to.

public void WriteAllText(String contents, Encoding encoding)

Parameters

contents

String

The string to write to.

encoding

Encoding

The encoding to apply to the string.

Properties

Bytes

Size of the file. Cached.

public UInt64 Bytes { get; set; }

Exists

Returns true if file exists. Uncached.

public override Boolean Exists { get; }

Exceptions

UnmatchedFileSystemEntryTypeException

Path exists but it's a directory.

Length

Size of the file (returns Bytes).

public UInt64 Length { get; }

Classdiagram

public classQuickIOFileInfoAppendAllLinesAppendAllLinesAppendAllTextAppendAllTextAsFileInfoCalculateHashCalculateHashCalculateMD5HashCalculateSha1HashCalculateSha256HashCalculateSha384HashCalculateSha512HashCalculateSizeGetMetadataop_ExplicitOpenOpenOpenOpenAppendOpenReadOpenTextOpenWriteReadAllBytesReadAllLinesReadAllLinesReadAllTextReadAllTextRetriveDateTimeInformationWriteAllBytesWriteAllBytesWriteAllLinesWriteAllLinesWriteAllTextWriteAllTextQuickIOFileInfoQuickIOFileInfoQuickIOFileInfoQuickIOFileInfoBytes { get; set; }Exists { get; }Length { get; }public abstract classQuickIOFileSystemEntryBase_creationTimeUtc_lastAccessTimeUtc_lastWriteTimeUtcCheckExistanceGetFileSystemSecurityGetOwnerGetOwnerIdentifierSafeExistsSetOwnerSetOwnerToStringQuickIOFileSystemEntryBaseAttributes { get; set; }CreationTime { get; }CreationTimeUtc { get; set; }Exists { get; }FindData { get; set; }FullName { get; }FullNameUnc { get; }IsReadOnly { get; set; }LastAccessTime { get; }LastAccessTimeUtc { get; set; }LastWriteTime { get; }LastWriteTimeUtc { get; set; }Name { get; }Parent { get; }ParentFullName { get; }PathInfo { get; set; }PathLocation { get; }PathType { get; }Root { get; }RootFullName { get; }public classQuickIOTransferFileCopyJob_copyTimestamps_transferStarted_transferStartedLockDirectoryCreatedDirectoryCreatingErrorFinishedProgressStartedImplementationOnCopyFinishedOnCopyProgressOnCopyStartedOnDirectoryCreatedOnDirectoryCreatingOnErrorQuickIOTransferFileCopyJobQuickIOTransferFileCopyJobCopyAttributes { get; set; }CopyTimestamps { get; set; }JobType { get; }Source { get; set; }Target { get; set; }TransferStarted { get; set; }

save

reset

Drag to pan - Use Mousewheel + Ctrl to zoom