os.Path.dirfmask

The os.Path.dirfmask defines a filter mask for diropen call. The syntax of its invocation is as follows:

 

CALL os.Path.dirfmask(filt_mask)

 

where:

·         filt_mask = an INTEGER variable defining the filter mask.

 

Usage

This function calling defines the filter mask for any subsequent diropen.

The selection of all the kinds of directory entries is carried outby the diropen function by default. A filter mask is used to abridge the number of entries.

The dirfmask function parameter is a combination of the bits described bellow:

·         0x01 for excluding hidden files (.*),

·         0x02 for excluding directories,

·         0x04 for excluding symbolic links,

·         0x08 for excluding regular files.

 

Here is an example of the os.Path.dirfmask method calling:

 

#retrieves only regular files

CALL os.Path.dirfmask(1 + 2 + 4)