Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Type of file service required. Pass as one of:

MAKE_DIR  Make Directory.

REMOVE_DIR  Remove Directory.

REMOVE_DIR_TREE  Remove a directory tree recursively. Be careful!

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.

COPY_DIR  Copy a directory and all its sub-directories to another directory. Any matching files in the target directory will be replaced.

COPY_PATTERN  Copy files matching the specified pattern to another directory. Any matching files in the target directory will be replaced.

1

256



2

A

Opt

Requested Service Argument 1

When Arg 1 is
      Pass this argument as:

MAKE_DIR  Name of directory to be made.

REMOVE_DIR  Name of directory to be removed.

REMOVE_DIR_TREE  Name of the 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.

COPY_DIR  Name of the directory to be copied.

COPY_PATTERN  Fully qualified path with file pattern to be copied.   Note * is the only wildcard that is supported.

1

256



3

A

Opt

Requested Service Argument 2.

When Arg 1 is
      Pass this argument as:

MAKE_DIR  Not required. Do not pass.

REMOVE_DIR  Not required. Do not pass.

REMOVE_DIR_TREE  Optional (only supported on MS Windows and Linux).

Pass FORCE to delete every file even if a files is READ-ONLY. Any other value, or no value, will return an error if a file is read-only.

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 (e.g: DLL, EXE, DOC).

Do not pass or pass as blanks to select all files.

COPY_DIR  Name of the directory to be copied to.

COPY_PATTERN  Name of the directory to be copied to.

1

256



...

The following sample RDML function (which can be copied and  and pasted in the CS/400 free form function editor) asks you to nominate a file name and then indicates whether or not the file exists:

...