|
Craig's Utility Library
4.0 Beta
|
File info class More...
Public Member Functions | |
| FileInfo (string Path, string UserName="", string Password="", string Domain="") | |
| Constructor More... | |
| FileInfo (IFile InternalFile) | |
| Constructor More... | |
| object | Clone () |
| Clones the file object More... | |
| int | CompareTo (IFile other) |
| Compares this to another file More... | |
| int | CompareTo (object obj) |
| Compares this object to another object More... | |
| IFile | CopyTo (IDirectory Directory, bool Overwrite) |
| Copies the file to another directory More... | |
| string | Delete () |
| Deletes the file More... | |
| override bool | Equals (object obj) |
| Determines if the objects are equal More... | |
| bool | Equals (IFile other) |
| Determines if the files are equal More... | |
| Process | Execute (ProcessStartInfo Info=null) |
| Executes the file More... | |
| override int | GetHashCode () |
| Gets the hash code for the file More... | |
| void | MoveTo (IDirectory Directory) |
| Moves the file to a new directory More... | |
| string | Read () |
| Reads the file in as a string More... | |
| byte[] | ReadBinary () |
| Reads a file as binary More... | |
| void | Rename (string NewName) |
| Renames the file More... | |
| T | To< T > () |
| Converts the file to the specified file format More... | |
| T | To< T, R > () |
| Converts the file to the specified file format More... | |
| Excel | To () |
| Converts the file to the specified file format More... | |
| override string | ToString () |
| Returns the name of the file More... | |
| string | Write (string Content, System.IO.FileMode Mode=FileMode.Create, Encoding Encoding=null) |
| Writes content to the file More... | |
| byte[] | Write (byte[] Content, System.IO.FileMode Mode=FileMode.Create) |
| Writes content to the file More... | |
Public Member Functions inherited from Utilities.IO.FileSystem.Interfaces.IFile | |
| 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... | |
Static Public Member Functions | |
| static bool | operator!= (FileInfo File1, FileInfo File2) |
| Determines if two directories are not equal More... | |
| static bool | operator< (FileInfo File1, FileInfo File2) |
| Less than More... | |
| static bool | operator<= (FileInfo File1, FileInfo File2) |
| Less than or equal More... | |
| static bool | operator== (FileInfo File1, FileInfo File2) |
| Determines if two directories are equal More... | |
| static bool | operator> (FileInfo File1, FileInfo File2) |
| Greater than More... | |
| static bool | operator>= (FileInfo File1, FileInfo File2) |
| Greater than or equal More... | |
| static implicit | operator byte[] (FileInfo File) |
| Reads the file and converts it to a byte array More... | |
| static implicit | operator string (FileInfo File) |
| Reads the file and converts it to a string More... | |
Properties | |
| DateTime | Accessed [get] |
| Last time accessed (UTC time) More... | |
| DateTime | Created [get] |
| Time created (UTC time) More... | |
| IDirectory | Directory [get] |
| Directory the file is within More... | |
| bool | Exists [get] |
| Does the file exist? More... | |
| string | Extension [get] |
| File extension More... | |
| string | FullName [get] |
| Full path More... | |
| long | Length [get] |
| Size of the file More... | |
| DateTime | Modified [get] |
| Time modified (UTC time) More... | |
| string | Name [get] |
| Name of the file More... | |
| IFile | InternalFile [get] |
| Internal directory More... | |
Properties inherited from Utilities.IO.FileSystem.Interfaces.IFile | |
| 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... | |
File info class
Definition at line 36 of file FileInfo.cs.
| Utilities.IO.FileInfo.FileInfo | ( | string | Path, |
| string | UserName = "", |
||
| string | Password = "", |
||
| string | Domain = "" |
||
| ) |
Constructor
| Path | Path to the file |
| Domain | Domain of the user (optional) |
| Password | Password to be used to access the file (optional) |
| UserName | User name to be used to access the file (optional) |
Definition at line 45 of file FileInfo.cs.
| Utilities.IO.FileInfo.FileInfo | ( | IFile | InternalFile | ) |
| object Utilities.IO.FileInfo.Clone | ( | ) |
| int Utilities.IO.FileInfo.CompareTo | ( | IFile | other | ) |
Compares this to another file
| other | File to compare to |
Definition at line 226 of file FileInfo.cs.
| int Utilities.IO.FileInfo.CompareTo | ( | object | obj | ) |
Compares this object to another object
| obj | Object to compare it to |
Definition at line 240 of file FileInfo.cs.
| IFile Utilities.IO.FileInfo.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 |
Implements Utilities.IO.FileSystem.Interfaces.IFile.
Definition at line 254 of file FileInfo.cs.
| string Utilities.IO.FileInfo.Delete | ( | ) |
Deletes the file
Implements Utilities.IO.FileSystem.Interfaces.IFile.
Definition at line 265 of file FileInfo.cs.
| override bool Utilities.IO.FileInfo.Equals | ( | object | obj | ) |
Determines if the objects are equal
| obj | Object to compare to |
Definition at line 277 of file FileInfo.cs.
| bool Utilities.IO.FileInfo.Equals | ( | IFile | other | ) |
Determines if the files are equal
| other | Other file |
Definition at line 288 of file FileInfo.cs.
| Process Utilities.IO.FileInfo.Execute | ( | ProcessStartInfo | Info = null | ) |
Executes the file
| Info | Info used to execute the file |
Definition at line 300 of file FileInfo.cs.
| override int Utilities.IO.FileInfo.GetHashCode | ( | ) |
| void Utilities.IO.FileInfo.MoveTo | ( | IDirectory | Directory | ) |
Moves the file to a new directory
| Directory | Directory to move to |
Implements Utilities.IO.FileSystem.Interfaces.IFile.
Definition at line 322 of file FileInfo.cs.
|
static |
Reads the file and converts it to a byte array
| File | File to read |
Definition at line 192 of file FileInfo.cs.
|
static |
Reads the file and converts it to a string
| File | File to read |
Definition at line 204 of file FileInfo.cs.
Determines if two directories are not equal
| File1 | File 1 |
| File2 | File 2 |
Definition at line 115 of file FileInfo.cs.
Less than
| File1 | File 1 |
| File2 | File 2 |
Definition at line 126 of file FileInfo.cs.
Less than or equal
| File1 | File 1 |
| File2 | File 2 |
Definition at line 139 of file FileInfo.cs.
Determines if two directories are equal
| File1 | File 1 |
| File2 | File 2 |
Definition at line 152 of file FileInfo.cs.
Greater than
| File1 | File 1 |
| File2 | File 2 |
Definition at line 167 of file FileInfo.cs.
Greater than or equal
| File1 | File 1 |
| File2 | File 2 |
Definition at line 180 of file FileInfo.cs.
| string Utilities.IO.FileInfo.Read | ( | ) |
Reads the file in as a string
Implements Utilities.IO.FileSystem.Interfaces.IFile.
Definition at line 333 of file FileInfo.cs.
| byte [] Utilities.IO.FileInfo.ReadBinary | ( | ) |
Reads a file as binary
Implements Utilities.IO.FileSystem.Interfaces.IFile.
Definition at line 344 of file FileInfo.cs.
| void Utilities.IO.FileInfo.Rename | ( | string | NewName | ) |
Renames the file
| NewName | New name for the file |
Implements Utilities.IO.FileSystem.Interfaces.IFile.
Definition at line 355 of file FileInfo.cs.
| Excel Utilities.IO.FileInfo.To | ( | ) |
Converts the file to the specified file format
Definition at line 389 of file FileInfo.cs.
| T Utilities.IO.FileInfo.To< T > | ( | ) |
Converts the file to the specified file format
| T | File format |
| T | : | FormatBase | |
| T | : | T | |
| T | : | string | |
| T | : | new() |
Definition at line 367 of file FileInfo.cs.
| T Utilities.IO.FileInfo.To< T, R > | ( | ) |
Converts the file to the specified file format
| T | File format |
| R | Record type |
| T | : | StringListFormatBase | |
| T | : | T | |
| T | : | R | |
| T | : | new() |
Definition at line 379 of file FileInfo.cs.
| override string Utilities.IO.FileInfo.ToString | ( | ) |
Returns the name of the file
Definition at line 398 of file FileInfo.cs.
| string Utilities.IO.FileInfo.Write | ( | string | Content, |
| System.IO.FileMode | Mode = FileMode.Create, |
||
| Encoding | Encoding = null |
||
| ) |
Writes content to the file
| Content | Content to write |
| Mode | Mode to open the file as |
| Encoding | Encoding to use for the content |
Definition at line 410 of file FileInfo.cs.
| byte [] Utilities.IO.FileInfo.Write | ( | byte[] | Content, |
| System.IO.FileMode | Mode = FileMode.Create |
||
| ) |
Writes content to the file
| Content | Content to write |
| Mode | Mode to open the file as |
Definition at line 423 of file FileInfo.cs.
|
get |
Last time accessed (UTC time)
Definition at line 62 of file FileInfo.cs.
|
get |
Time created (UTC time)
Definition at line 67 of file FileInfo.cs.
|
get |
Directory the file is within
Definition at line 72 of file FileInfo.cs.
|
get |
Does the file exist?
Definition at line 77 of file FileInfo.cs.
|
get |
File extension
Definition at line 82 of file FileInfo.cs.
|
get |
Full path
Definition at line 87 of file FileInfo.cs.
|
getprotected |
Internal directory
Definition at line 107 of file FileInfo.cs.
|
get |
Size of the file
Definition at line 92 of file FileInfo.cs.
|
get |
Time modified (UTC time)
Definition at line 97 of file FileInfo.cs.
|
get |
Name of the file
Definition at line 102 of file FileInfo.cs.