MFGSIO File
MFGSIOFile Public interface
Description
Describes methods and properties available on the static instance object MFGS.IO.File
Diagram
flowchart LR classDef interfaceStyle stroke-dasharray: 5 5; classDef abstractStyle stroke-width:4px subgraph VGWWCoreIEx VGWWCoreIEx.IExMFGSIOFile[[IExMFGSIOFile]] class VGWWCoreIEx.IExMFGSIOFile interfaceStyle; endMembers
Methods
Public methods
| Returns | Name |
|---|---|
void | AppendAllText(string filePath, object contents, MFGSTextEncoding encoding)Appends the specified string to the file, creating the file if it does not already exist. |
bool | Exists(string filePath)Determines whether the specified file exists. |
void | WriteAllText(string filePath, object contents, MFGSTextEncoding encoding)Creates a new file, write the contents to the file, and then closes the file. If the target file already exists, it is overwritten. |
Details
Summary
Describes methods and properties available on the static instance object MFGS.IO.File
Methods
Exists
public bool Exists(string filePath)Arguments
| Type | Name | Description |
|---|---|---|
string | filePath | The file to check. |
Summary
Determines whether the specified file exists.
Returns
true if the caller has the required permissions and path contains the name of an existing file; otherwise, false. This method also returns false if filePath is null, an invalid path, or a zero-length string. If the caller does not have sufficient permissions to read the specified file, no exception is thrown and the method returns false regardless of the existence of filePath.
AppendAllText
public void AppendAllText(string filePath, object contents, MFGSTextEncoding encoding)Arguments
| Type | Name | Description |
|---|---|---|
string | filePath | The file to append the specified string to. |
object | contents | The string to append to the file. |
MFGSTextEncoding | encoding | The character encoding to use. |
Summary
Appends the specified string to the file, creating the file if it does not already exist.
WriteAllText
public void WriteAllText(string filePath, object contents, MFGSTextEncoding encoding)Arguments
| Type | Name | Description |
|---|---|---|
string | filePath | The file to write to. |
object | contents | The string to write to the file. |
MFGSTextEncoding | encoding | The encoding to apply to the string. |
Summary
Creates a new file, write the contents to the file, and then closes the file. If the target file already exists, it is overwritten.
Generated with ModularDoc