Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Methods for listing directories

The list() methods return a list of all or selected names of files and directories in the directory which this RecordFile object represents. The file/directory names are returned without parent directories. The order of the names returned is not defined. The files and directories returned can be selected using a filter (see RecordfilenameFilter in chapter   "API overview").

Name

Results

:JAVA:

Only the home user ID, for example $USER., for non-privileged users or all user IDs in the pubset JAVA for a privileged user

:JAVA:HALLO.JAVA

Empty as no directory was specified

$USER.

Visible files of the user ID USER in their default catalog ID

$.

Visible files of the standard system ID

:JAVA:$.

Visible files of the standard system ID on the pubset JAVA

Table 3: Sample DMS file system


The listFiles() methods return an array of RecordFile objects with path names of files or directories in the directory which is represented by the path name of this RecordFile object. The path names created are created from the directory itself and the file and directory names that are ascertained. The order of the names is not defined. The files and directories returned can be selected using filters (see RecordFilenameFilter and RecordFileFilter in chapter "API overview").

The list() and listFiles() methods can provide an application with information on file names that do not belong to their actual area. These methods are therefore monitored by an active Security Manager. Consequently, they are allowed only if the application has read permission for the corresponding directory (see section "Security").

The static method listRoots() returns a list of all file system prefixes (“roots”) for the specified file system. It is guaranteed that the canonical path name of a file that actually exists physically begins with one of the prefixes returned by listRoots().

The listRoots() method provides an application with information on the structure of the file system. If a Security Manager is active, only the roots for which read permission has been granted are shown. If you want the application to be able to determine all roots, you must grant the application read permission for
<<ALL FILES>> (see section "Security").

Special features of the DMS file system

A list of all accessible catalog IDs is returned.