Net File Functions

The file functions provide a way to monitor and close the file, device, and pipe resources open on a server. The file functions are:

NetFileClose
NetFileEnum
NetFileGetInfo

Use the NetFileClose function when the file cannot be closed by other means. This function should be used with caution, however, because it does not write to the file the data cached on the client system is obsolete.

The NetFileEnum function returns information about resources open on a server. A file can be opened one or more times by one or more applications. Each file opening is uniquely identified. The NetFileEnum function returns an entry for each file opening. The NetFileGetInfo function returns information about one particular opening of a resource.

File information is available at the following levels.

FILE_INFO_2
FILE_INFO_3

Levels 0 and 1 are not supported. Level 2 returns only the identification number assigned to the resource when it was opened. Level 3 returns the identification number, permissions, file locks, and the name of the user who opened the resource.