C++ Native Functions: com.teracloud.streams.teda.file.path
- public rstring dirname(rstring path)
-
Returns the parent path for the path.
For example, dirname("/abs/path/filename.txt") returns /abs/path.
- Parameters
-
- path
-
Specifies the relative or absolute path from which the parent path is extracted.
- Returns
-
The parent path.
- public rstring entire(rstring path)
-
Returns the absolute and canonical path for the path.
For example, absolute("./filename.txt") returns /current/path/filename.txt.
- Parameters
-
- path
-
Specifies the path to be returned as entire path.
- Returns
-
The entire path.
- public rstring entire(rstring path, rstring basepath)
-
Returns the absolute and canonical path for the path.
For example, absolute("./filename.txt","/the/base/path/sub/../") returns /the/base/path/filename.txt.
- Parameters
-
- path
-
Specifies the path to be returned as entire path.
- basepath
-
Specifies the path that is the base for relative path.
- Returns
-
The entire path.
- public rstring extension(rstring path)
-
Returns the extension of a given file name prefixed with a period (.). In case a file does not have an extension, the function returns an empty string.
For example, extension("/abs/path/filename.txt") returns .txt.
- Parameters
-
- path
-
Specifies the file name, or a relative or absolute path from which the file name is extracted.
- Returns
-
The extension of the file name.
- public rstring filename(rstring path)
-
Returns the file name that is extracted from the path.
For example, filename("/abs/path/filename.txt") returns filename.txt.
- Parameters
-
- path
-
Specifies the file name, or a relative or absolute path from which the file name is extracted.
- Returns
-
The file name.
- public rstring stem(rstring path)
-
Returns the string before the period (.) in the file name.
For example, stem("/abs/path/filename.txt") returns filename.
- Parameters
-
- path
-
Specifies the file name, or a relative or absolute path from which the file name is extracted.
- Returns
-
The string before the period (.) in the file name.