Goto: 4C Home | 4C Docs | System PCLs List sys.file_op()

sys.file_op()

Purpose:
sys.file_op() allows you to manipulate files on both the client and the server in a platform independent manner.
Usage:
ret = sys.file_op(<cmd>,<flags>,<path1>[,<path2>]...);
Arguments:

<cmd> - One of

<flags> - Any combination of

<path1>,...<pathN> - One or more file/directory paths. The meaning and correct number of path arguments depends on <cmd>.
Returns:
integer <ret> -
0 - OK, No Error/False
1 - No Error/True
< 0 - Error, and sys.errno will be set appropriately.
Where Used:
sys.file_op() can be called from anywhere.
Example:
The demo.fileop.1 program in the demo application shows how to use sys.file_op().
Description:
sys.file_op() allows the application to manipulate files on either the client or the server in a platform independent manner. The commands available and they way they operate are Any of the <path> arguments can be an environment variable that is expanded on the target machine before executing the operation. Use the ${ENVVAR} syntax to specify an envvar for a <path>.

<path> arguments can also use the special '*' character to indicate multiple filenames.

When sys.file_op() returns -1, sys.errno() may be set to any of the following:
Requirements
4cserver Version 4.8.1 or later.
4cclient Version 4.8.1 or later when FOP_CLIENT is specified.
Bugs/Features/Comments:
See Also:


Back to Top