The directory library provides the following classes:
Article number/class name |
Class Name
Swrba_Directory
List of Methods
Method | Description |
String make_directory(String hostname, String username, String password, String directoryname, String ostype, String execusername, String execpassword) | Make directories to the specified host.. "Success" is returned if the file making was successful. An exception is returned if the file making failed. |
String delete_directory(String hostname, String username, String password, String directoryname, String ostype, String execusername, String execpassword) | Delete directories recursively from the specified host. "Success" is returned if the file deletion was successful. An exception is returned if the file deletion failed. |
Integer return_code() | Return the return value of the directory making or deletion results. |
Input Information
hostname Specify the host name or IP address.
username Specify the name of the user using SSH to connect to the host making or deleting the directory.
If the operation component connects with the file transfer infrastructure, the connected user name will be fixed at either of the following names and cannot be changed. In this case, the user name is ignored even if specified.
- If the Business Server is running on Windows: SYSTEM user
- If the Business Server is running on Linux: root
password Specify the password of the user using SSH to connect to the host making or deleting the directory.
If the operation component connects with the file transfer infrastructure, the password is ignored even if specified.
directoryname Specify the name of the directory to be created or deleted.
ostype Specify the operating system type of the host making or deleting the directory.
execusername Specify the name of the user making or deleting the directory.
If the host specified by the "hostname" option is running on Windows and the connection is made using the file transfer infrastructure, execute the command as a SYSTEM user. In this case, the user name is ignored even if specified.
execpassword This library does not use the value of "execpassword".
The value of "execpassword" is ignored even if specified.
Notes
If the information except for the Management Server has been entered for "hostname", this library uses the file transfer infrastructure or SSH communication to perform its operations. Set either at least to be able to communicate. Refer to the "3.16 Notes of Each Communication Method" for the notes of each communication method.
If the connected user and executing user are different, refer to the "3.16.7 Notes When Connected User And Executing User Are Different".
For the file whose string is to be replaced, specify a text file that uses appropriate character encoding, as listed in the following table.
Host containing the file with the string to be replaced | Character encoding of the text file |
---|---|
Windows Management Server | CHARACTER ENCODING SPECIFIED BY THE LANG ENVIRONMENT VARIABLE |
Linux Management Server | UTF-8 |
Windows Linked Server or Business Server | CHARACTER ENCODING SPECIFIED BY THE LANG ENVIRONMENT VARIABLE |
Linux Linked Server or Business Server | Character encoding specified by the LANG environment variable |
Use alphanumeric characters and the following symbols for the names of the directory to be created or be deleted.
Symbols that can be used: "!", "~", "_", "-", ".".
File Location
Windows | <Installation directory>\SWRBAM\rbaope\bin\parts\lib\ standard\swrba_file.rb |
Linux | /opt/FJSVswrbam/rbaope/bin/parts/lib/standard/swrba_file.rb |
Class Name
Swrba_Directory
List of Methods
Method | Description |
String change_directory_authority(String hostname, String username, String password, String directoryname, String ownerauthority, String groupauthority, String otherauthority, String ostype, String execusername, String execpassword) | Change the access permissions for the directory on the specified host. "Success" is returned if access permissions were changed successfully. An exception is returned if access permissions failed to be changed. |
Integer return_code() | Return the return value of the results of changing access permissions. |
Input Information
hostnameSpecify the host name or IP address.
username Specify the name of the user using SSH to connect to the host where the directory whose access permissions are to be changed resides.
If the operation component connects with the file transfer infrastructure, the connected user name will be fixed at either of the following names and cannot be changed. In this case, the user name is ignored even if specified.
- If the Business Server is running on Windows: SYSTEM user
- If the Business Server is running on Linux: root
password Specify the password of the user using SSH to connect to the host where the directory whose access permissions are to be changed resides.
If the operation component connects with the file transfer infrastructure, the password is ignored even if specified.
directoryname Specify the name of the directory whose access permissions are to be changed.
ownerauthority Specify the access permission content of the owner of the directory to be changed. Specify the execute (X), read (R), write (W), or cancel all (C) permissions.
If the access permissions for a directory are changed using the file transfer infrastructure and the directory is in a Windows environment, the directory attributes will change.
groupauthority Specify the access permission content of the owner group of the directory to be changed. Specify the execute (X), read (R), write (W), or cancel all (C) permissions.
If the access permissions for a directory are changed and the directory is in a Windows environment, the specified content does not take effect.
otherauthority Specify the access permission content of other users of the directory to be changed. Specify the execute (X), read (R), write (W), or cancel all (C) permissions.
If the access permissions for a directory are changed and the directory is in a Windows environment, the specified content does not take effect.
ostype Specify the operating system of the host where the directory whose access permissions are to be changed resides.
execusername Specify the name of the user whose directory access permissions are to be changed.
If the host specified by the "hostname" option is running on Windows and the connection is made using the file transfer infrastructure, execute the command as a SYSTEM user. In this case, the user name is ignored even if specified.
execpassword This library does not use the value of "execpassword".
The value of "execpassword" is ignored even if specified.
Notes
If the information except for the Management Server has been entered for "hostname", this library uses the file transfer infrastructure or SSH communication to perform its operations. Set either at least to be able to communicate. Refer to the "3.16 Notes of Each Communication Method" for the notes of each communication method.
If the connected user and executing user are different, refer to the "3.16.7 Notes When Connected User And Executing User Are Different".
Use alphanumeric characters and the following symbols for the names of the directories to which access permissions are changed.
Symbols that can be used: "!", "~", "_", "-", ".".
File Location
Windows | <Installation directory>\SWRBAM\rbaope\bin\parts\lib\ standard\swrba_file.rb |
Linux | /opt/FJSVswrbam/rbaope/bin/parts/lib/standard/swrba_file.rb |
Class Name
Swrba_Directory
List of Methods
Method | Description |
String compress_directory(String hostname, String username, String password, String compfilename, String directoryname, String overwrite, String ostype, String execusername, String execpassword) | Compress directories on the specified host. The compressed format is zip form. "Success" is returned if the directory compression was successful. An exception is returned if the directory compression failed. |
Integer return_code() | Return the return value of the directory compression results. |
Input Information
hostname Specify the host name or IP address.
username Specify the name of the user using SSH to connect to the host compressing the directory.
If the operation component connects with the file transfer infrastructure, the connected user name will be fixed at either of the following names and cannot be changed. In this case, the user name is ignored even if specified.
- If the Business Server is running on Windows: SYSTEM user
- If the Business Server is running on Linux: root
password Specify the password of the user using SSH to connect to the host compressing the directory.
If the operation component connects with the file transfer infrastructure, the password is ignored even if specified.
compfilename Specify the name of the file to be compressed.
directoryname Specify the name of the directory to be compressed.
overwrite Specify whether to overwrite file if a compressed file already exists.
ostype Specify the operating system of the host compressing the directory.
execusernameSpecify the name of the user compressing the directory.
If the host specified by the "hostname" option is running on Windows and the connection is made using the file transfer infrastructure, execute the command as a SYSTEM user. In this case, the user name is ignored even if specified.
execpassword This library does not use the value of "execpassword".
The value of "execpassword" is ignored even if specified.
Notes
If the information except for the Management Server has been entered for "hostname", this library uses the file transfer infrastructure or SSH communication to perform its operations. Set either at least to be able to communicate. Refer to the "3.16 Notes of Each Communication Method" for the notes of each communication method.
If the connected user and executing user are different, refer to the "3.16.7 Notes When Connected User And Executing User Are Different".
Use alphanumeric characters and the following symbols for the names of the files or directories to be compressed.
Symbols that can be used: "!", "~", "_", "-", ".".
File Location
Windows | <Installation directory>\SWRBAM\rbaope\bin\parts\lib\ standard\swrba_file.rb |
Linux | /opt/FJSVswrbam/rbaope/bin/parts/lib/standard/swrba_file.rb |