Skip to main content

1E SDK

FileSystem.PathExists

Method

PathExists

Module

FileSystem

Library

Core

Action

Checks whether a path exists.

Parameters

Path (string): The path of the file system object. The path can include environment variables represented by the local shell format (e.g. %env% on Windows), and wildcards such as '*' for multiple characters and '?' for a single character.

Return values

If nothing is found then the method returns success but no rows; this is because a complex instruction script may want to continue to execute rather than fail abruptly.

For each file or directory found:

  • FullPath (string): The full path, with any wildcards and environment variables expanded.

  • IsDirectory (bool): Represents if the path points to a file or directory.

Example

FileSystem.PathExists(Path:"c:\\tmp\\i*.txt");
FileSystem.PathExists(Path:"c:\\tmp");
FileSystem.PathExists(Path:"%programfiles%\\1E\\Tachyon\\TIMS\\Tachyon.InstructionManagementStudio.exe");

Platforms

  • Windows

  • Linux

  • MacOS

Notes