Scan open files


Section contents


Overview

Defined in

cfile.oxh

Description

Use this class to get a list of the entries for all files which are currently open in a particular file server session. OpenFileScanNext creates a list of the files opened by the session. The ID of the thread which opened the files listed may be obtained by calling OpenFileScanThreadId. If multiple sessions are in use, repeatedly calling OpenFileScanNext will return a list of open files in each session.


Construction / destruction


NewOpenFileScan - Constructor

Usage

this& = NewOpenFileScan&:(fs&)

Description

The C++ constructor constructs the OpenFileScan object with a file server session.

Return Value
this& An value which represents the created OpenFileScan entry
Error Handling

If the object could not be created then an error is generated which should be trapped by an ONERR handler.

Example
  LOCAL this&,fs&

  this& = NewOpenFileScan&:(fs&)
  DeleteOpenFileScan:(this&) 

DeleteOpenFileScan - Destructor

Usage

DeleteOpenFileScan:(BYREF this&)

Description

Destroys the OpenFileScan object.

Arguments
BYREF this& A handle to a OpenFileScan object
Example
  LOCAL this&,fs&

  this& = NewOpenFileScan&:(fs&)
  DeleteOpenFileScan:(this&) 

Methods provided


OpenFileScanNext - get list of open files

Usage

OpenFileScanNext:(this&,BYREF filelist&)

Description

Use this function to get a list of entries for the open files in a file server session.

Arguments
this& A handle to a OpenFileScan object
BYREF filelist& On return, contains a list of entries for all open files in a file server session.
Error Handling

If the scan fails then an error is generated which should be trapped by an ONERR handler.


OpenFileScanThreadId - get ID of thread wihich opened files

Usage

id& = OpenFileScanThreadId&:(this&)

Description

Use this function to get the ID of the thread which opened the files listed by OpenFileScaneNext.

Arguments
this& A handle to a OpenFileScan object
Return value
id& ID of the thread which opened the files in the file list
Error Handling

If the scan fails then an error is generated which should be trapped by an ONERR handler.