Skip to content

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;
end

Members

Methods

Public methods

ReturnsName
voidAppendAllText(string filePath, object contents, MFGSTextEncoding encoding)
Appends the specified string to the file, creating the file if it does not already exist.
boolExists(string filePath)
Determines whether the specified file exists.
voidWriteAllText(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
TypeNameDescription
stringfilePathThe 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
TypeNameDescription
stringfilePathThe file to append the specified string to.
objectcontentsThe string to append to the file.
MFGSTextEncodingencodingThe 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
TypeNameDescription
stringfilePathThe file to write to.
objectcontentsThe string to write to the file.
MFGSTextEncodingencodingThe 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