Click or drag to resize

FileSystemExists Method

Checks whether a file exists in the controller file system or not.

Namespace:  ABB.Robotics.Controllers.FileSystemDomain
Assembly:  ABB.Robotics.Controllers (in ABB.Robotics.Controllers.dll) Version: 6.5.129.0
Syntax
C#
public bool Exists(
	string path
)

Parameters

path
Type: SystemString
The full path of the file.

Return Value

Type: Boolean
TRUE if the files exists, otherwise FALSE.
Remarks
If the full path is given the specified path will be searched; otherwise the current directory will be searched.
Examples
This example checks if a specified file exists in the current directory of the controller.
Controller c = new Controller();
FileSystem fs = c.FileSystem;
string path = fs.RemoteDirectory + "\" + "test.mod";
if(fs.Exists(path))
{
    // file exists
}
else
{
    //file doesn't exist
}
fs.Dispose();
c.Dispose();
See Also