0.9b (c) 1995 Peter Childs
The function retrieves information about a particular opened file on a server.
Syntax
MyRc = NetGetInfo(NETFILE, 'fileInfo', SrvName, fileId)
Parameters
The parameters specified are:
'fileInfo' The REXX variable receiving the result. The variable is divided into:
o fileInfo.id
The file identifier
o fileInfo.permissions
The access permissions of the opening application.
o fileInfo.num_locks
The number of file locks on the file, device, or pipe
o fileInfo.pathname
The path name of the opened resource
o fileInfo.username
The name of the userid that first opened the file
SrvName The server computer name
fileId The file identifier. This value must be supplied
Note
The server computer name can be specified as '' for a local server.
Example
/* Get opened file information */ call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs' call LoadLsRxutFuncs NETFILE = 60 SrvName = '\\FSCDC' fileId = 167273 myRc = NetGetInfo(NETFILE, 'fileInfo', SrvName, fileId) if myRc <> '0' then do say 'Got error from NetGetInfo() ' myRc call DropLsRxutFuncs exit 9 end say say "File id: " fileInfo.id say "File permissions: " fileInfo.permissions say "File number locks: " fileInfo.num_locks say "File path: " fileInfo.pathname say "File user name: " fileInfo.username call DropLsRxutFuncs call RxFuncDrop 'LoadLsRxutFuncs' exit 0
Example Output
File id: 167273 File permissions: R File number locks: 0 File path: D:\BOOKS\GG243783.BOO File user name: FSCADMIN
Inf-HTML End Run - Successful