scanerasedfiles

Scans the specified directory for information about deleted (salvageable) files.

Library:LibC
Classification:Novell
Service:File and Directory I/O

Syntax

  #include <fsio.h> 
   
  int scanerasedfiles (
     const char   *path,
     long         *nextEntryNumber,
     NWDIR        *deletedFileInfo );
  

Parameters

path

(IN) Points to the string containing the path specification of the directory to view.

nextEntryNumber

(IN/OUT) Points to the entry number of the next file (initially set this to -1). This number uniquely identifies the file or directory, and is used to salvage the entry, to purge the entry, or to continue the scan.

deletedFileInfo

(OUT) Points to a structure containing information about the entry.

Return Values

If successful, returns 0. Otherwise, returns -1 and sets errno.

Decimal

Constant

Description

1

ENOENT

End of scan.

9

EINVAL

The path is invalid.

79

ENOTSUP

The operation is not supported on the specified file system.

105

ENOCONTEXT

The calling thread has no context.

Remarks

The scanerasedfiles function can be called repeatedly to obtain the list of deleted entries contained in the directory specified by the pathname parameter. Entries marked for deletion can be scanned to obtain information about who deleted them and when they were deleted.

On NSS volumes, both deleted files and directories are returned. Once a directory is salvaged, it can be scanned to show its deleted files and directories. On traditional volumes, only files are returned. Once a directory is removed, any deleted files are moved to the DELETED.SAV directory off the root of the volume. This directory can be scanned and the files salvaged or purged. The deleted directory structure cannot be recovered.

The path parameter can be an absolute path with a volume name or it can be relative to the current working directory. In the following example of a path, the erased files in the DIR1 directory on the SYS volume are scanned:

  SYS:\DIR1
  

The caller must have See File rights in the specified directory.

See Also