OV_FILE_SERVICE
The Things that Make Up this Example | To Execute this Example | BIF Descriptions |
DLL Required : U_BIF992.DLL
------------
Description : Performs basic file and directory services
-----------
Availability : Windows -> YES
Unix -> YES
OS/400 -> NO
ARGUMENTS
---------
Type Required/ Length Decimals
Number A/N Optional Description Min Max Min Max
------ --- -------- ----------- ------- -------
1 A Req Type of file service required 1 256
Pass as one of :
MAKE_DIR : Make Directory.
REMOVE_DIR : Remove Directory.
CHECK_DIR : Check if directory exists.
CHECK_FILE : Check if a file exists.
SET_FILE : Set a file's attribute to read only or normal (read/write).
COPY_FILE : Copy a file to another file.
REMOVE_FILE : Remove file.
GET_DIR : Get contents of a directory
2 A Opt Requested Service Argument 1 1 256
When Arg 1 is Pass this argument as
------------- ---------------------
MAKE_DIR Name of directory to be made.
REMOVE_DIR Name of directory to be removed.
CHECK_DIR Name of directory to be checked for.
CHECK_FILE Name of file to be checked for.
SET_FILE Name of file to be set.
COPY_FILE Name of file to be copied from.
REMOVE_FILE Name of file to be removed /deleted.
GET_DIR Name of directory whose contents are to be returned.
3 A Opt Requested Service Argument 2 1 256
When Arg 1 is Pass this argument as
------------- ---------------------
MAKE_DIR Not required. Do not pass.
REMOVE_DIR Not required. Do not pass.
CHECK_DIR Not required. Do not pass.
CHECK_FILE Not required. Do not pass.
SET_FILE Pass as READ_ONLY or NORMAL.
COPY_FILE Name of file to be copied to.
REMOVE_FILE Optional. (only supported on 32 bit MS Windows)
Pass FORCE to delete every file
even if a file is read-only. Any other value,
or no value, will return an error if a file is
read-only.
GET_DIR Optional file suffix to select files of
only a specific type when retrieving the
contents of a directory (eg: DLL, EXE, DOC).
Do not pass or pass as blanks to select all
files.
RETURN VALUES
-------------
Type Required/ Length Decimals
Number A/N Optional Description Min Max Min Max
------ --- -------- ----------- ------- -------
1 A Opt Basic Return Code 2 2
Returned as "OK" (completed
normally) or "ER" (error occured).
2 N Opt Extended Error Code 1 15 0 0
This is the operating system error
code (when available) that may aid
you in error handling or error
reporting.
3 List Opt Returned working List. This list is
only returned for certain argument 1
values as follows :
When Arg 1 is This argument is returned as
------------- ----------------------------
MAKE_DIR Not returned.
REMOVE_DIR Not returned.
CHECK_DIR Not returned.
CHECK_FILE Not returned.
SET_FILE Not returned.
COPY_FILE Not returned.
REMOVE_FILE Not returned.
GET_DIR The working list that is to contain the
contents of the directory. It may contain
from 1 to 6 fields (ie: columns) which will be
returned as the full file name. the file name (sans
suffix), the file suffix, the file date (format YYYYMMDD),
the file time (format HHMMSS), the file size (which must
be a numeric field) and finally a (sub)directory indicator
(which is returned as Y or N). Existing contents of this
working lists are cleared by this builtin. Refer to the
following example for more information.