RemoteDirectory
STD.File.RemoteDirectory
STD.File.RemoteDirectory
File.RemoteDirectory
RemoteDirectory
( machineIP, directory
[ , mask ][ , includesubs ] )
machineIP
A null-terminated string containing the IP address of the
remote machine.
directory
A null-terminated string containing the path to the directory
to read. This must be in the appropriate format for the operating
system running on the remote machine.
mask
Optional. A null-terminated string containing the filemask
specifying which files to include in the result. If omitted,the
default is '*' (all files).
includesubdir
Optional. A boolean flag indicating whether to include files
from sub-directories under the directory. If
omitted, the default is FALSE.
Return:
RemoteDirectory returns a dataset in the following
format:
EXPORT FsFilenameRecord := RECORD
STRING name; //filename
UNSIGNED8 size; //filesize
STRING19 modified; //date-time stamp
END;
The RemoteDirectory function returns
a list of files as a dataset in the format listed above from the specified
machineIP and directory. If
includesubdir is set to TRUE, then the name field
contains the relative path to the file from the specified
directory.
The mask argument is a string that can include wildcard characters.
Valid wildcard characters are '*' (to match zero or more characters) and '?'
(to match exactly one character). Non-wild characters are matched exactly
and are case-sensitive.
Example:
OUTPUT(STD.File.RemoteDirectory('edata12','\in','*.d00'));
OUTPUT(STD.File.RemoteDirectory('10.150.254.6',
'/var/lib/HPCCSystems/hpcc-data/thor/','acc*',TRUE));