Craig's Utility Library  4.0 Beta
Utilities.IO.FileSystem.Default.LocalFile Class Reference

Basic local file class More...

Inheritance diagram for Utilities.IO.FileSystem.Default.LocalFile:
Utilities.IO.FileSystem.BaseClasses.FileBase< System.IO.FileInfo, LocalFile >

Public Member Functions

 LocalFile ()
 Constructor More...
 
 LocalFile (string Path)
 Constructor More...
 
 LocalFile (System.IO.FileInfo File)
 Constructor More...
 
override IFile CopyTo (IDirectory Directory, bool Overwrite)
 Copies the file to another directory More...
 
override string Delete ()
 Deletes the file More...
 
override void MoveTo (IDirectory Directory)
 Moves the file to a new directory More...
 
override string Read ()
 Reads the file in as a string More...
 
override byte[] ReadBinary ()
 Reads a file as binary More...
 
override void Rename (string NewName)
 Renames the file More...
 
override string Write (string Content, System.IO.FileMode Mode=FileMode.Create, Encoding Encoding=null)
 Writes content to the file More...
 
override byte[] Write (byte[] Content, System.IO.FileMode Mode=FileMode.Create)
 Writes content to the file More...
 
- Public Member Functions inherited from Utilities.IO.FileSystem.BaseClasses.FileBase< System.IO.FileInfo, LocalFile >
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...
 
abstract IFile CopyTo (IDirectory Directory, bool Overwrite)
 Copies the file to another directory More...
 
override bool Equals (object obj)
 Determines if the objects are equal More...
 
bool Equals (IFile other)
 Determines if the files are equal More...
 
override int GetHashCode ()
 Gets the hash code for the file More...
 
abstract void MoveTo (IDirectory Directory)
 Moves the file to a new directory More...
 
override string ToString ()
 Returns the name of the file More...
 

Properties

override DateTime Accessed [get]
 Last time accessed (UTC time) More...
 
override DateTime Created [get]
 Time created (UTC time) More...
 
override IDirectory Directory [get]
 Directory the file is within More...
 
override bool Exists [get]
 Does the file exist? More...
 
override string Extension [get]
 File extension More...
 
override string FullName [get]
 Full path More...
 
override long Length [get]
 Size of the file More...
 
override DateTime Modified [get]
 Time modified (UTC time) More...
 
override string Name [get]
 Name of the file More...
 
- Properties inherited from Utilities.IO.FileSystem.BaseClasses.FileBase< System.IO.FileInfo, LocalFile >
abstract DateTime Accessed [get]
 Last time accessed (UTC time) More...
 
abstract DateTime Created [get]
 Time created (UTC time) More...
 
abstract IDirectory Directory [get]
 Directory the file is within More...
 
abstract bool Exists [get]
 Does the file exist? More...
 
abstract string Extension [get]
 File extension More...
 
abstract string FullName [get]
 Full path More...
 
abstract long Length [get]
 Size of the file More...
 
abstract DateTime Modified [get]
 Time modified (UTC time) More...
 
abstract string Name [get]
 Name of the file More...
 
string Domain [get, set]
 Domain of the user More...
 
InternalFileType InternalFile [get, set]
 Internal directory More...
 
string Password [get, set]
 Password More...
 
string UserName [get, set]
 User name used More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Utilities.IO.FileSystem.BaseClasses.FileBase< System.IO.FileInfo, LocalFile >
static implicit operator byte[] (FileBase< InternalFileType, FileType > File)
 Reads the file and converts it to a byte array More...
 
static implicit operator string (FileBase< InternalFileType, FileType > File)
 Reads the file and converts it to a string More...
 
static bool operator!= (FileBase< InternalFileType, FileType > File1, IFile File2)
 Determines if two directories are not equal More...
 
static bool operator< (FileBase< InternalFileType, FileType > File1, IFile File2)
 Less than More...
 
static bool operator<= (FileBase< InternalFileType, FileType > File1, IFile File2)
 Less than or equal More...
 
static bool operator== (FileBase< InternalFileType, FileType > File1, IFile File2)
 Determines if two directories are equal More...
 
static bool operator> (FileBase< InternalFileType, FileType > File1, IFile File2)
 Greater than More...
 
static bool operator>= (FileBase< InternalFileType, FileType > File1, IFile File2)
 Greater than or equal More...
 
- Protected Member Functions inherited from Utilities.IO.FileSystem.BaseClasses.FileBase< System.IO.FileInfo, LocalFile >
 FileBase ()
 Constructor More...
 
 FileBase (InternalFileType InternalFile)
 Constructor More...
 
 FileBase (InternalFileType InternalFile, string UserName, string Password, string Domain)
 Constructor More...
 

Detailed Description

Basic local file class

Definition at line 34 of file LocalFile.cs.

Constructor & Destructor Documentation

Utilities.IO.FileSystem.Default.LocalFile.LocalFile ( )

Constructor

Definition at line 39 of file LocalFile.cs.

Utilities.IO.FileSystem.Default.LocalFile.LocalFile ( string  Path)

Constructor

Parameters
PathPath to the file

Definition at line 47 of file LocalFile.cs.

Utilities.IO.FileSystem.Default.LocalFile.LocalFile ( System.IO.FileInfo  File)

Constructor

Parameters
FileFile to use

Definition at line 56 of file LocalFile.cs.

Member Function Documentation

override IFile Utilities.IO.FileSystem.Default.LocalFile.CopyTo ( IDirectory  Directory,
bool  Overwrite 
)

Copies the file to another directory

Parameters
DirectoryDirectory to copy the file to
OverwriteShould the file overwrite another file if found
Returns
The newly created file

Definition at line 139 of file LocalFile.cs.

override string Utilities.IO.FileSystem.Default.LocalFile.Delete ( )
virtual

Deletes the file

Returns
Any response for deleting the resource (usually FTP, HTTP, etc)

Implements Utilities.IO.FileSystem.BaseClasses.FileBase< System.IO.FileInfo, LocalFile >.

Definition at line 157 of file LocalFile.cs.

override void Utilities.IO.FileSystem.Default.LocalFile.MoveTo ( IDirectory  Directory)

Moves the file to a new directory

Parameters
DirectoryDirectory to move to

Definition at line 170 of file LocalFile.cs.

override string Utilities.IO.FileSystem.Default.LocalFile.Read ( )
virtual

Reads the file in as a string

Returns
The file contents as a string

Implements Utilities.IO.FileSystem.BaseClasses.FileBase< System.IO.FileInfo, LocalFile >.

Definition at line 183 of file LocalFile.cs.

override byte [] Utilities.IO.FileSystem.Default.LocalFile.ReadBinary ( )
virtual

Reads a file as binary

Returns
The file contents as a byte array

Implements Utilities.IO.FileSystem.BaseClasses.FileBase< System.IO.FileInfo, LocalFile >.

Definition at line 197 of file LocalFile.cs.

override void Utilities.IO.FileSystem.Default.LocalFile.Rename ( string  NewName)
virtual

Renames the file

Parameters
NewNameNew name for the file

Implements Utilities.IO.FileSystem.BaseClasses.FileBase< System.IO.FileInfo, LocalFile >.

Definition at line 221 of file LocalFile.cs.

override string Utilities.IO.FileSystem.Default.LocalFile.Write ( string  Content,
System.IO.FileMode  Mode = FileMode.Create,
Encoding  Encoding = null 
)
virtual

Writes content to the file

Parameters
ContentContent to write
ModeMode to open the file as
EncodingEncoding to use for the content
Returns
The result of the write or original content

Implements Utilities.IO.FileSystem.BaseClasses.FileBase< System.IO.FileInfo, LocalFile >.

Definition at line 236 of file LocalFile.cs.

override byte [] Utilities.IO.FileSystem.Default.LocalFile.Write ( byte[]  Content,
System.IO.FileMode  Mode = FileMode.Create 
)
virtual

Writes content to the file

Parameters
ContentContent to write
ModeMode to open the file as
Returns
The result of the write or original content

Implements Utilities.IO.FileSystem.BaseClasses.FileBase< System.IO.FileInfo, LocalFile >.

Definition at line 251 of file LocalFile.cs.

Property Documentation

override DateTime Utilities.IO.FileSystem.Default.LocalFile.Accessed
get

Last time accessed (UTC time)

Definition at line 65 of file LocalFile.cs.

override DateTime Utilities.IO.FileSystem.Default.LocalFile.Created
get

Time created (UTC time)

Definition at line 73 of file LocalFile.cs.

override IDirectory Utilities.IO.FileSystem.Default.LocalFile.Directory
get

Directory the file is within

Definition at line 81 of file LocalFile.cs.

override bool Utilities.IO.FileSystem.Default.LocalFile.Exists
get

Does the file exist?

Definition at line 89 of file LocalFile.cs.

override string Utilities.IO.FileSystem.Default.LocalFile.Extension
get

File extension

Definition at line 97 of file LocalFile.cs.

override string Utilities.IO.FileSystem.Default.LocalFile.FullName
get

Full path

Definition at line 105 of file LocalFile.cs.

override long Utilities.IO.FileSystem.Default.LocalFile.Length
get

Size of the file

Definition at line 113 of file LocalFile.cs.

override DateTime Utilities.IO.FileSystem.Default.LocalFile.Modified
get

Time modified (UTC time)

Definition at line 121 of file LocalFile.cs.

override string Utilities.IO.FileSystem.Default.LocalFile.Name
get

Name of the file

Definition at line 129 of file LocalFile.cs.


The documentation for this class was generated from the following file: