Table of Contents

Class FileInfo

Namespace
CMS.FileSystemStorage
Assembly
CMS.IO.dll

Envelope for System.IO.FileInfo class.

public class FileInfo : FileInfo
Inheritance
object
FileInfo
Inherited Members
Extension Methods

Constructors

FileInfo(string)

Initializes new instance of FileInfo.

public FileInfo(string filename)

Parameters

filename string

File name from which info should be created

Properties

Attributes

File attributes.

public override FileAttributes Attributes { get; set; }

Property Value

FileAttributes

CreationTime

Creation date of file.

public override DateTime CreationTime { get; set; }

Property Value

DateTime

Directory

Directory of file.

public override DirectoryInfo Directory { get; }

Property Value

DirectoryInfo

DirectoryName

Directory name of file (without path).

public override string DirectoryName { get; }

Property Value

string

Exists

If file exists.

public override bool Exists { get; }

Property Value

bool

Extension

File extension.

public override string Extension { get; }

Property Value

string

FullName

Full name of file (with whole path).

public override string FullName { get; }

Property Value

string

IsReadOnly

If is read only.

public override bool IsReadOnly { get; set; }

Property Value

bool

LastAccessTime

Creation date of file.

public override DateTime LastAccessTime { get; set; }

Property Value

DateTime

LastWriteTime

Last write time to file.

public override DateTime LastWriteTime { get; set; }

Property Value

DateTime

Length

Length of file.

public override long Length { get; }

Property Value

long

Name

File name of file (without path).

public override string Name { get; }

Property Value

string

SystemInfo

Returns system file info object.

public override FileInfo SystemInfo { get; }

Property Value

FileInfo

Methods

CopyToInternal(string, bool)

Copies an existing file to a new file, allowing the overwriting of an existing file.

protected override FileInfo CopyToInternal(string destFileName, bool overwrite)

Parameters

destFileName string

Destination file name

overwrite bool

Whether overwriting is allowed

Returns

FileInfo

CreateTextInternal()

Creates or opens a file for writing UTF-8 encoded text.

protected override StreamWriter CreateTextInternal()

Returns

StreamWriter

DeleteInternal()

Deletes file.

protected override void DeleteInternal()

MoveToInternal(string)

Copies an existing file to a new file, allowing the overwriting of an existing file.

protected override void MoveToInternal(string destFileName)

Parameters

destFileName string

Destination file name

OpenReadInternal()

Opens file for reading.

protected override FileStream OpenReadInternal()

Returns

FileStream

OpenTextInternal()

Creates stream which reads from file.

protected override StreamReader OpenTextInternal()

Returns

StreamReader

ToString()

Converts FileInfo object to string.

public override string ToString()

Returns

string