Craig's Utility Library
4.0 Beta
|
Represents an individual file More...
Public Member Functions | |
IFile | CopyTo (IDirectory Directory, bool Overwrite) |
Copies the file to another directory More... | |
string | Delete () |
Deletes the file More... | |
void | MoveTo (IDirectory Directory) |
Moves the file to another directory More... | |
string | Read () |
Reads the file to the end as a string More... | |
byte[] | ReadBinary () |
Reads the file to the end as a byte array More... | |
void | Rename (string NewName) |
Renames the file More... | |
string | Write (string Content, FileMode Mode=FileMode.Create, Encoding Encoding=null) |
Writes content to the file More... | |
byte[] | Write (byte[] Content, FileMode Mode=FileMode.Create) |
Writes content to the file More... | |
Properties | |
DateTime | Accessed [get] |
Last time the file was accessed More... | |
DateTime | Created [get] |
When the file was created More... | |
IDirectory | Directory [get] |
Directory the file is in More... | |
bool | Exists [get] |
Does the file exist currently More... | |
string | Extension [get] |
File extension More... | |
string | FullName [get] |
Full path to the file More... | |
long | Length [get] |
Size of the file in bytes More... | |
DateTime | Modified [get] |
When the file was last modified More... | |
string | Name [get] |
File name More... | |
IFile Utilities.IO.FileSystem.Interfaces.IFile.CopyTo | ( | IDirectory | Directory, |
bool | Overwrite | ||
) |
Copies the file to another directory
Directory | Directory to copy the file to |
Overwrite | Should the file overwrite another file if found |
Implemented in Utilities.IO.FileSystem.BaseClasses.FileBase< InternalFileType, FileType >, and Utilities.IO.FileInfo.
string Utilities.IO.FileSystem.Interfaces.IFile.Delete | ( | ) |
Deletes the file
Implemented in Utilities.IO.FileSystem.BaseClasses.FileBase< InternalFileType, FileType >, and Utilities.IO.FileInfo.
void Utilities.IO.FileSystem.Interfaces.IFile.MoveTo | ( | IDirectory | Directory | ) |
Moves the file to another directory
Directory | Directory to move the file to |
Implemented in Utilities.IO.FileSystem.BaseClasses.FileBase< InternalFileType, FileType >, and Utilities.IO.FileInfo.
string Utilities.IO.FileSystem.Interfaces.IFile.Read | ( | ) |
Reads the file to the end as a string
Implemented in Utilities.IO.FileInfo, and Utilities.IO.FileSystem.BaseClasses.FileBase< InternalFileType, FileType >.
byte [] Utilities.IO.FileSystem.Interfaces.IFile.ReadBinary | ( | ) |
Reads the file to the end as a byte array
Implemented in Utilities.IO.FileInfo, and Utilities.IO.FileSystem.BaseClasses.FileBase< InternalFileType, FileType >.
void Utilities.IO.FileSystem.Interfaces.IFile.Rename | ( | string | NewName | ) |
Renames the file
NewName | New file name |
Implemented in Utilities.IO.FileInfo, and Utilities.IO.FileSystem.BaseClasses.FileBase< InternalFileType, FileType >.
string Utilities.IO.FileSystem.Interfaces.IFile.Write | ( | string | Content, |
FileMode | Mode = FileMode.Create , |
||
Encoding | Encoding = null |
||
) |
Writes content to the file
Content | Content to write |
Mode | File mode |
Encoding | Encoding that the content should be saved as (default is UTF8) |
byte [] Utilities.IO.FileSystem.Interfaces.IFile.Write | ( | byte[] | Content, |
FileMode | Mode = FileMode.Create |
||
) |
Writes content to the file
Content | Content to write |
Mode | File mode |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |