I have the following problem, when I try to find out, if a file or directory exists within my C# project (in a virtual and also in a real system):
“ArgumentException: Parameter name: path2”
ControllerFileSystemInfo sInfo = controllerFS.GetFilesAndDirectories(“*”);
Console.WriteLine(sInfo[0].Name); // this is OK (e.g. “Windows” in the virtual system)
Console.WriteLine(sInfo[0].FullName); // this is OK (“ctrl:C:/Windows”)
if (sInfo[0].Exists) Console.WriteLine(“Success”); // ArgumentException
The same happens with DirectoryExists and FileExists with the FullName as path.
What is the best method to find out, if the respective ControllerFileSystemInfo entry relates to a file or directory? The help mentiones a enum FileType, but it seems to be used nowhere?
Thanks very much for your help!
Fabian
Tested with Robotstudio 5.13.03, Win 7 32 and 64bit, VS 2008 and 2010 getting the same error.