Qorus Integration Engine® Enterprise Edition 6.0.19_prod
Loading...
Searching...
No Matches
QorusSystemFsService Class Reference

system fs service More...

Inherits QorusSystemService.

Public Member Methods

nothing rename (string source, string target, softbool man=False)
 rename service method More...
 
nothing rename_conn (string conn_src, string source, string conn_tgt, string target, softbool man=False)
 rename_conn service method More...
 
nothing copy (string source, string target)
 copy service method More...
 
nothing copy_conn (string conn_src, string source, string conn_tgt, string target)
 copy_conn service method More...
 
nothing del (string path)
 del service method More...
 
nothing del_conn (string conn, string path)
 del_conn service method More...
 
list ls (string path, *string regex, *softint reopts, *string encoding)
 ls service method More...
 
list ls_conn (string conn, *string path, *string regex, *softint reopts, *string encoding)
 ls_conn service method More...
 
binary get_file_bin (string path)
 get_file_bin service method More...
 
binary get_file_bin_conn (string conn, string path)
 get_file_bin_conn service method More...
 
string get_file_string (string path, *string encoding)
 get_file_string service method More...
 
string get_file_string_conn (string conn, string path, *string encoding)
 get_file_string_conn service method More...
 
nothing write_file (string path, data data, int mode=0664, *string encoding)
 write_file service method More...
 
nothing write_file_conn (string conn, string path, data data, int mode=0664, *string encoding)
 write_file_conn service method More...
 
hash hstat_file (string path)
 hstat_file service method More...
 
hash hstat_file_conn (string conn, string path)
 hstat_file_conn service method More...
 

Detailed Description

system fs service

Member Function Documentation

◆ copy()

nothing QorusSystemFsService::copy ( string  source,
string  target 
)
inline

copy service method

Parameters
sourcethe source path
targetthe target path

If any errors occur, an exception is thrown

Exceptions
COPY-ERRORcannot stat() source file

◆ copy_conn()

nothing QorusSystemFsService::copy_conn ( string  conn_src,
string  source,
string  conn_tgt,
string  target 
)
inline

copy_conn service method

Parameters
conn_srcthe source user connection name
sourcethe source path, relative to conn_src
conn_tgtthe target user connection name
targetthe target path, relative to conn_tgt

If any errors occur, an exception is thrown

Exceptions
CONNECTION-ERRORthe given connection is not known
COPY-ERRORcannot stat() source file
FS-USER-CONNECTION-ERRORthe given connection is not a filesystem connection

◆ del()

nothing QorusSystemFsService::del ( string  path)
inline

del service method

Parameters
paththe path of the file to delete

If any errors occur, an exception is thrown

Exceptions
UNLINK-ERRORerror removing the file

◆ del_conn()

nothing QorusSystemFsService::del_conn ( string  conn,
string  path 
)
inline

del_conn service method

Parameters
connan user connection name
paththe path of the file to delete, relative to conn

If any errors occur, an exception is thrown

Exceptions
CONNECTION-ERRORthe given connection is not known
FS-USER-CONNECTION-ERRORthe given connection is not a filesystem connection
UNLINK-ERRORerror removing the file

◆ get_file_bin()

binary QorusSystemFsService::get_file_bin ( string  path)
inline

get_file_bin service method

Parameters
paththe path of the file to retrieve
Returns
the file data as binary data

◆ get_file_bin_conn()

binary QorusSystemFsService::get_file_bin_conn ( string  conn,
string  path 
)
inline

get_file_bin_conn service method

Parameters
connan user connection name
paththe path of the file to retrieve, relative to conn
Returns
the file data as binary data
Exceptions
CONNECTION-ERRORthe given connection is not known
FS-USER-CONNECTION-ERRORthe given connection is not a filesystem connection

◆ get_file_string()

string QorusSystemFsService::get_file_string ( string  path,
*string  encoding 
)
inline

get_file_string service method

Parameters
paththe path of the file to retrieve
encodingthe encoding of the source file
Returns
the file data as a string

◆ get_file_string_conn()

string QorusSystemFsService::get_file_string_conn ( string  conn,
string  path,
*string  encoding 
)
inline

get_file_string_conn service method

Parameters
connanuser connection
paththe path of the file to retrieve
encodingthe encoding of the source file
Returns
the file data as a string
Exceptions
CONNECTION-ERRORthe given connection is not known
FS-USER-CONNECTION-ERRORthe given connection is not a filesystem connection

◆ hstat_file()

hash QorusSystemFsService::hstat_file ( string  path)
inline

hstat_file service method

Parameters
paththe path of the file to stat
Returns
NOTHING or a StatInfo file status value hashes for the path argument
See also
Qore::hstat()

◆ hstat_file_conn()

hash QorusSystemFsService::hstat_file_conn ( string  conn,
string  path 
)
inline

hstat_file_conn service method

Parameters
conna user connection; must be a filesystem connection
paththe path of the file to stat
Returns
NOTHING or a StatInfo file status value hashes for the path argument
Exceptions
CONNECTION-ERRORthe given connection is not known
FS-USER-CONNECTION-ERRORthe given connection is not a filesystem connection
See also
Qore::hstat()

◆ ls()

list QorusSystemFsService::ls ( string  path,
*string  regex,
*softint  reopts,
*string  encoding 
)
inline

ls service method

Parameters
paththe path to list
regexan optional regex to filter the results
reoptsoption regular expression options; see Regular Expression Constants for possible values
encodingthe encoding of the filesystem string data
Returns
a list of StatInfo file status value hashes for each matched file plus a "name" key with the file or directory name and optionally a "link" key for symbolic link targets
Exceptions
DIR-ERRORdirectory does not exist

◆ ls_conn()

list QorusSystemFsService::ls_conn ( string  conn,
*string  path,
*string  regex,
*softint  reopts,
*string  encoding 
)
inline

ls_conn service method

Parameters
connan user connection name
paththe path to list, relative to conn. It can be empty, then the toplevel connection directory is listed.
regexan optional regex to filter the results
reoptsoption regular expression options; see Regular Expression Constants for possible values
encodingthe encoding of the filesystem string data
Returns
a list of StatInfo file status value hashes for each matched file plus a "name" key with the file or directory name and optionally a "link" key for symbolic link targets
Exceptions
CONNECTION-ERRORthe given connection is not known
DIR-ERRORdirectory does not exist
FS-USER-CONNECTION-ERRORthe given connection is not a filesystem connection

◆ rename()

nothing QorusSystemFsService::rename ( string  source,
string  target,
softbool  man = False 
)
inline

rename service method

Parameters
sourcethe source path
targetthe target path
manrename the file manually by copying the file's data and then deleting the source file, this is sometimes necessary on some OSes when renaming files across filesystem boundaries

If any errors occur, an exception is thrown

Exceptions
RENAME-ERRORcannot stat() source file

◆ rename_conn()

nothing QorusSystemFsService::rename_conn ( string  conn_src,
string  source,
string  conn_tgt,
string  target,
softbool  man = False 
)
inline

rename_conn service method

Parameters
conn_srcthe source user connection name
sourcethe source path, relative to conn_src
conn_tgtthe target user connection name
targetthe target path, relative to conn_tgt
manrename the file manually by copying the file's data and then deleting the source file, this is sometimes necessary on some OSes when renaming files across filesystem boundaries

If any errors occur, an exception is thrown

Exceptions
CONNECTION-ERRORthe given connection is not known
FS-USER-CONNECTION-ERRORthe given connection is not a filesystem connection
RENAME-ERRORcannot stat() source file

◆ write_file()

nothing QorusSystemFsService::write_file ( string  path,
data  data,
int  mode = 0664,
*string  encoding 
)
inline

write_file service method

Parameters
paththe path of the file to write
datathe file data to write
modethe file's creation mode
encodingthe encoding of the target file

◆ write_file_conn()

nothing QorusSystemFsService::write_file_conn ( string  conn,
string  path,
data  data,
int  mode = 0664,
*string  encoding 
)
inline

write_file_conn service method

Parameters
conna user connection
paththe path of the file to write, relative to conn
datathe file data to write
modethe file's creation mode
encodingthe encoding of the target file
Exceptions
CONNECTION-ERRORthe given connection is not known
FS-USER-CONNECTION-ERRORthe given connection is not a filesystem connection

The documentation for this class was generated from the following file: