 |
| Enumerating files opened on the network |
User rating: 0/10 (0 votes) | |
|
|
 |
 |
| Before you begin: |
 |
Usage:
LOCAL oFiles As TOpenFiles, oFile As TOpenFile
oFiles = CREATEOBJECT("TOpenFiles", "SOME_SERVER")
CREATE CURSOR csFiles (fileid I, permissions I, numlocks I,;
username C(32), pathname C(250))
FOR EACH oFile IN oFiles
WITH oFile
INSERT INTO csFiles (fileid, permissions, numlocks,;
username, pathname);
VALUES (.fileid, .permissions, .numlocks,;
FromUnicode(.username),;
FromUnicode(.pathname))
ENDWITH
NEXT
SELECT csFiles
GO TOP
BROWSE NORMAL NOWAIT
See also:
FileSystemWatcher ActiveX Control for Visual FoxPro
Monitoring changes in a directory
Enumerating global and local group accounts on a server
Obtaining names of local and global groups for current user
How to enumerate, add and delete shares on the local computer
Enumerating sessions established on a server
|
 |
 |
| |
| |
Members area. Log in to view this example. |
|
| |
|
|
|
|
|
 |
User rating: 0/10 (0 votes) | |
| 3020 bytes Created: 2001-08-26 12:00:00 Modified: 2011-02-16 13:29:32 Visits in 7 days: 91 |
|
 |
 |
| Listed functions: |
 |
|
 |
 |
| My comment: |
 |
May.24, 2007: rewritten from scratch
Only members of the Administrators or Server Operators local group can successfully execute the NetFileEnum function.
Here is an example of data this code sample returns:

The number of file locks in FILE_INFO_3 structure does not relate to whether a VFP table or database open in exclusive or shared mode. This structure member shows zero.
For RPC communication, the Server service opens a named pipe SRVSVC.
* * *
Read RLOCK topic on VFP Wiki for explanation of how VFP locks table records. |
 |
 |
| Word Index links for this example: |
 |
|
|
 |
 |
| Translate this page: |
 |
|