Top
Systemwalker Runbook Automation Reference Guide
Systemwalker

3.15.7 Directory Library

The directory library provides the following classes:

Article number/class name

3.15.7.1 Directory Making/Directory Deletion

3.15.7.2 Changing Directory Access Permissions

3.15.7.3 Directory Compression

3.15.7.1 Directory Making/Directory Deletion

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

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

3.15.7.2 Changing Directory Access Permissions

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

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

3.15.7.3 Directory Compression

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

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