Details
-
Sub-task
-
Resolution: Done
-
P2: Important
-
None
-
7a8a21c03b8e49e7dbf0462d2c698e960bdacbb4
Description
For example:
Rule/Transformer
The input/output variable is a FileReference object. It is only set if there is exactly one input/output to the Rule/Transformer, otherwise it is undefined.
The inputs/outputs variable is a map of file tags (strings) to arrays of FileReference objects (see below).
Artifact
The input variable is a FileReference object.
FileReference Properties
Property | Type | Description | Example |
---|---|---|---|
fileName | string | The name of the file. | archive.tar.gz |
filePath | string | The absolute path to the file. | /private/var/tmp/archive.tar.gz |
baseName | string | The name of the file not including any file extension. | archive |
completeBaseName | string | The name of the file excluding the last file extension component. | archive.tar |
baseDir | string | The name of the directory immediately containing the file. | tmp |
Currently, only fileName is defined in the Artifact's input variable. For consistency, The fileName property in the context of the Rule.prepare script should be renamed to filePath. (done in eac4bba41ed9e68dee9a019e0fedc51d220ef112) All 5 properties should then be made available on the FileReference objects in both contexts.
- Note: FileReference is just an informal name for a JavaScript object happening to contain the aforementioned properties; it need only appear in the documentation for ease of referring to it.
Attachments
Issue Links
- relates to
-
QBS-258 QBS uses inconsistent terminology when talking about file names and paths
- Closed