Extensions.File.GetFilePath

From emotive
Jump to navigation Jump to search

Classification

Name GetFilePath
Short Description Returns the URI of the path of the specified file
Class Term
Extension OTX File extension
Group File related Terms
Exceptions -
Checker Rules -
Standard Compliant Yes

OTL Syntax

StringTerm File.GetFilePath(FileHandleTerm handle);

Description

The GetFilePath activity returns the URI of the path of the specified file, which is either absolute or relative to OTX home.

Return Value

The Term returns the value, see table below.

Icons Note.png In OTX, Terms are categorized according to its return data type!
Data Type Description
String Returns the URI of the path of the specified file.

Properties

Name Data Type Class Default Cardinality Description
Handle FileHandle Term - [1..1] The file handle to get the file path from.

OTL Examples

/// Local Declarations

File.FileWriteHandle FileWriteHandle1;
String String1 = "";
String Path_String = "";

/// Flow

String1 = File.CreateTempDirectory();
FileWriteHandle1 = File.OpenFileForWrite(StringUtil.StringConcatenate({String1, "/abc.txt"}), false, @Encoding:UTF-8);
Path_String = File.GetFilePath(FileWriteHandle1);

See also

CreateTempDirectory
GetFilesFromDirectory
GetFileSize
IsDirectory
IsEndOfFileReached
IsFile
OpenFileForRead
OpenFileForWrite
ReadBytes
ReadFile
ReadLine