A surrogate for System.IO.FileInfo. More...
Public Member Functions | |
| TextWriter | AppendText () |
| Creates a System.IO.StreamWriter that appends text to the file represented by this instance of the System.IO.FileInfo. More... | |
| FileInfo | CopyTo (string destFileName) |
| Copies an existing file to a new file, disallowing the overwriting of an existing file. More... | |
| FileInfo | CopyTo (string destFileName, bool overwrite) |
| Copies an existing file to a new file, allowing the overwriting of an existing file. More... | |
| FileStream | Create () |
| Creates a file. More... | |
| TextWriter | CreateText () |
| Creates a KSP.IO.TextWriter that writes a new text file. More... | |
| void | Decrypt () |
| Decrypts a file that was encrypted by the current account using the System.IO.FileInfo.Encrypt() method. More... | |
| void | Delete () |
| Permanently deletes a file. More... | |
| void | Encrypt () |
| Encrypts a file so that only the account used to encrypt the file can decrypt it. More... | |
| void | MoveTo (string destFileName) |
| Moves a specified file to a new location, providing the option to specify a new file name. More... | |
| FileStream | Open (FileMode mode) |
| Opens a file in the specified mode. More... | |
| FileStream | Open (FileMode mode, FileAccess access) |
| Opens a file in the specified mode with read, write, or read/write access. More... | |
| FileStream | Open (FileMode mode, FileAccess access, FileShare share) |
| Opens a file in the specified mode with read, write, or read/write access and the specified sharing option. More... | |
| FileStream | OpenRead () |
| Creates a read-only System.IO.FileStream. More... | |
| TextReader | OpenText () |
| Creates a System.IO.StreamReader with UTF8 encoding that reads from an existing text file. More... | |
| FileStream | OpenWrite () |
| Creates a write-only System.IO.FileStream. More... | |
| FileInfo | Replace (string destinationFileName, string destinationBackupFileName) |
| Replaces the contents of a specified file with the file described by the current System.IO.FileInfo object, deleting the original file, and creating a backup of the replaced file. More... | |
| FileInfo | Replace (string destinationFileName, string destinationBackupFileName, bool ignoreMetadataErrors) |
| Replaces the contents of a specified file with the file described by the current System.IO.FileInfo object, deleting the original file, and creating a backup of the replaced file. Also specifies whether to ignore merge errors. More... | |
| string | ToString () |
| Returns the path as a string. More... | |
Static Public Member Functions | |
| static FileInfo | CreateForType< T > (string filename, Vessel flight=null) |
| Create a text reader stream. More... | |
Properties | |
| string | DirectoryName [get] |
| Gets a string representing the directory's full path. More... | |
| bool | Exists [get] |
| Gets a value indicating whether a file exists. More... | |
| bool | IsReadOnly [get, set] |
| Gets or sets a value that determines if the current file is read only. More... | |
| long | Length [get] |
| Gets the size, in bytes, of the current file. More... | |
| string | Name [get] |
| Gets the name of the file. More... | |
A surrogate for System.IO.FileInfo.
| TextWriter KSP.IO.FileInfo.AppendText | ( | ) |
Creates a System.IO.StreamWriter that appends text to the file represented by this instance of the System.IO.FileInfo.
| FileInfo KSP.IO.FileInfo.CopyTo | ( | string | destFileName | ) |
Copies an existing file to a new file, disallowing the overwriting of an existing file.
| destFileName |
| FileInfo KSP.IO.FileInfo.CopyTo | ( | string | destFileName, |
| bool | overwrite | ||
| ) |
Copies an existing file to a new file, allowing the overwriting of an existing file.
| destFileName | |
| overwrite |
| FileStream KSP.IO.FileInfo.Create | ( | ) |
Creates a file.
Create a text reader stream.
| T |
| filename | |
| flight |
| TextWriter KSP.IO.FileInfo.CreateText | ( | ) |
Creates a KSP.IO.TextWriter that writes a new text file.
| void KSP.IO.FileInfo.Decrypt | ( | ) |
Decrypts a file that was encrypted by the current account using the System.IO.FileInfo.Encrypt() method.
| void KSP.IO.FileInfo.Delete | ( | ) |
Permanently deletes a file.
| void KSP.IO.FileInfo.Encrypt | ( | ) |
Encrypts a file so that only the account used to encrypt the file can decrypt it.
| void KSP.IO.FileInfo.MoveTo | ( | string | destFileName | ) |
Moves a specified file to a new location, providing the option to specify a new file name.
| destFileName |
| FileStream KSP.IO.FileInfo.Open | ( | FileMode | mode | ) |
Opens a file in the specified mode.
| mode |
| FileStream KSP.IO.FileInfo.Open | ( | FileMode | mode, |
| FileAccess | access | ||
| ) |
Opens a file in the specified mode with read, write, or read/write access.
| mode | |
| access |
| FileStream KSP.IO.FileInfo.Open | ( | FileMode | mode, |
| FileAccess | access, | ||
| FileShare | share | ||
| ) |
Opens a file in the specified mode with read, write, or read/write access and the specified sharing option.
| mode | |
| access | |
| share |
| FileStream KSP.IO.FileInfo.OpenRead | ( | ) |
Creates a read-only System.IO.FileStream.
| TextReader KSP.IO.FileInfo.OpenText | ( | ) |
Creates a System.IO.StreamReader with UTF8 encoding that reads from an existing text file.
| FileStream KSP.IO.FileInfo.OpenWrite | ( | ) |
Creates a write-only System.IO.FileStream.
| FileInfo KSP.IO.FileInfo.Replace | ( | string | destinationFileName, |
| string | destinationBackupFileName | ||
| ) |
Replaces the contents of a specified file with the file described by the current System.IO.FileInfo object, deleting the original file, and creating a backup of the replaced file.
| destinationFileName | |
| destinationBackupFileName |
| FileInfo KSP.IO.FileInfo.Replace | ( | string | destinationFileName, |
| string | destinationBackupFileName, | ||
| bool | ignoreMetadataErrors | ||
| ) |
Replaces the contents of a specified file with the file described by the current System.IO.FileInfo object, deleting the original file, and creating a backup of the replaced file. Also specifies whether to ignore merge errors.
| destinationFileName | |
| destinationBackupFileName | |
| ignoreMetadataErrors |
| string KSP.IO.FileInfo.ToString | ( | ) |
Returns the path as a string.
|
get |
Gets a string representing the directory's full path.
|
get |
Gets a value indicating whether a file exists.
|
getset |
Gets or sets a value that determines if the current file is read only.
|
get |
Gets the size, in bytes, of the current file.
|
get |
Gets the name of the file.
1.8.7