File I/O Elements
File I/O elements enable files to be manipulated on a remote host. Files can be created, copied, edited, and deleted.
Contents
- <fileio:write>: Create a file with specified content.
- <fileio:copy>: Copy a file from one location to another.
- <fileio:edit>: Edit the contents of a file. Content can either be appended, or searched and replaced.
- <fileio:remove>: Remove/delete a file.
<fileio:copy>
Copy a file from one location to another location on the file system.
Attributes
Name |
Type |
Description |
Default |
Values |
---|---|---|---|---|
asAdmin |
Boolean |
If set to true, this action is performed as the root user. |
false |
— |
data |
object |
This attribute can specify a JavaScript variable that contains a JSON representation of all attributes that are used or required to execute this action. It can be used instead of individually specifying all attributes. |
— |
— |
fromFilename |
string (required) |
The source file on the file system to be copied. |
— |
— |
gdaport |
integer |
Defines the GDA port on the target host to which to connect. |
— |
— |
host |
string (required) |
Specifies the host Configuration object name upon which this task is to be performed. |
— |
— |
result |
string |
Defines the name of a JavaScript variable that contains the result of the action. A value of "true" indicates success. A value of "false" indicates failure. Note: The execution is stopped if a failure occurs. |
— |
— |
toFilename |
string (required) |
The destination on the file system to which the file is to be copied. |
— |
— |
<fileio:edit>
A directive to edit the contents of a file on the file system.
Attributes
Name |
Type |
Description |
Default |
Values |
---|---|---|---|---|
asAdmin |
Boolean |
If set to true, this action is performed as the root user. |
false |
— |
content |
string (required) |
Specifies the new text or content to write into the file on the file system. |
— |
— |
data |
object |
This attribute can specify a JavaScript variable that contains a JSON representation of all attributes that are used or required to execute this action. It can be used instead of individually specifying all attributes. |
— |
— |
filename |
string (required) |
The name of the file on the file system to be modified. |
— |
— |
gdaport |
integer |
Defines the GDA port on the target host to which to connect. |
— |
— |
host |
string (required) |
Specifies the host Configuration object name upon which this task is to be performed. |
— |
— |
mode |
string |
Specifies the edit mode. The replace value means that the content of searchtext is replaced with the content in the content attribute. The append value means that the content in the content attribute is appended to the end of the file. |
append |
append, replace |
result |
string |
Defines the name of a JavaScript variable that contains the result of the action. A value of "true" indicates success. A value of "false" indicates failure. Note: The execution is stopped if a failure occurs. |
— |
— |
searchtext |
string |
Specifies the text for which to search for if mode="replace" is specified. |
— |
— |
skipIfContentExists |
Boolean |
If set to true, the file is first searched for content of the content attribute. If it is already present, then the file edit operation is skipped. |
false |
— |
<fileio:remove>
A directive to remove/delete a file on the file system.
Attributes
Name |
Type |
Description |
Default |
Values |
---|---|---|---|---|
asAdmin |
Boolean |
If set to true, this action is performed as the root user. |
false |
— |
data |
object |
This attribute can specify a JavaScript variable that contains a JSON representation of all attributes that are used or required to execute this action. It can be used instead of individually specifying all attributes. |
— |
— |
filename |
string (required) |
The name of the file on the file system to be deleted. |
— |
— |
gdaport |
integer |
Defines the GDA port on the target host to which to connect. |
— |
— |
host |
string (required) |
Specifies the host Configuration object name upon which this task is to be performed. |
— |
— |
result |
string |
Defines the name of a JavaScript variable that contains the result of the action. A value of "true" indicates success. A value of "false" indicates failure. Note: The execution is stopped if a failure occurs. |
— |
— |
<fileio:write>
A directive to create a file on the file system.
Attributes
Name |
Type |
Description |
Default |
Values |
---|---|---|---|---|
asAdmin |
Boolean |
If set to true, this action is performed as the root user. |
false |
— |
content |
string |
Specifies the content to be written to the file on the file system. |
— |
— |
contentfile |
string |
Specifies the name of a file on the file system which contains the content to be written to the file. |
— |
— |
data |
object |
This attribute can specify a JavaScript variable that contains a JSON representation of all attributes that are used or required to execute this action. It can be used instead of individually specifying all attributes. |
— |
— |
filename |
string (required) |
The name of the file to be written on the file system. |
— |
— |
gdaport |
integer |
Defines the GDA port on the target host to which to connect. |
— |
— |
host |
string (required) |
Specifies the host Configuration object name upon which this task is to be performed. |
— |
— |
result |
string |
Defines the name of a JavaScript variable that contains the result of the action. A value of "true" indicates success. A value of "false" indicates failure. Note: The execution is stopped if a failure occurs. |
— |
— |