File Functions
BuildPath
Description
Append a name onto an existing path. The format of the new path is ‘path\name'.
Syntax
- BuildPath( path, name)
Arguments
- path
- A string representing a file path.
- name
- A string of either a subpath or file name.
FileExists
Description
Returns whether the file specified by the File argument exists.
Syntax
- FileExists( file )
Arguments
- file
- The full path of the file.
FileName
Description
Returns the file name from a path.
Syntax
- FileName( filepath )
Arguments
- filepath
- The full path of the file.
FilePath
Description
Returns the path from a file path.
Syntax
- FilePath( filepath)
Arguments
- filepath
- The full path of the file.
ReadTextFile
Description
Reads the contents of a text file.
Syntax
- ReadTextFile( filepath , throwonerror )
Arguments
- filepath
- The full path of the file.
- throwonerror
- When set to False the function will return an empty string instead of raising an error when an error occurs either opening or reading the file.
WriteBinaryValue
Description
Writes the value of a binary field to the specified path. If the file exists it will be overwritten.
Syntax
- WriteBinaryValue( filepath , fieldId )
Arguments
- filepath
- The path to write the field's contents.
- fieldId
- The binary field's name. If the field is not a Binary field type an error will be raised.