File plugin isFile/isDirectory in network

Hello,

Need to check for specific path whether it is a file/folder or not
So far, i’ve used

var filo = plugins.file.createFile(record.filepath)		
if( filo )			
  if( filo.isFile() )

Is this dangerous to createFile? Haven’t found any bad side-effects on Win7, but i’m wondering about behaving this code on other platforms. Maybe it recreates the folder and it’s contents might be lost!? Any bad experiences?

This approach is not working when check if there is file/folder in home network; How to check if path of file/folder exists in network?
Example of network folder’s path:

\\Username-PC\Users\Username\foldersPath

Regards

convert to jsfile object

var jFile = plugins.file.convertToJSFile(filePath)

check if exists

var doesExist = jFile.exists()

check if file

var isFIle = jFile.isFIle()

check if directory

var isDir = jFile.isDirectory()

Thank you for your fast answer!

Will replace createFile with convertToJSFile
However, neither createFile nor convertToJSFile work for network path.
How to recognize folder/file that’s in network?
Filepaths like:

\\Username-PC\Users\Username\foldersPath

Regards

Actually, convertToJSFile does work for network paths.

With pre-condition that need to allow access: i’ve done that by reaching netowork’s machine’s file system via Windows explorer first.

Issue solved -Thanks again!

Regards