1 2 (* Combination with function that checks if OS is NT-based can by used to3 detect if volume is NTFS. 4 5 >> Note: To get proper info about any volume you must have at least read access6 to it even it is a sharing(e.g.\\myserver\MyShare ) or exact path (e.g. C:\)7 8 *)9 .......
10 /* uses SysUtils, Windows */
11 ......
12 13 //The function supports UNC paths14 //Example aPath values:15 // C:\16 // C:\Program Files\MyInstallationFolder17 // C:\Program Files\MyInstallationFolder\18 // \\myserver\c$\19 // \\myserver\MyShare20 function VolumeSupportsPersistentACLs( aPath : string) : Boolean;
21 var22 maxClen,
23 driveFlags : Cardinal;
24 VolName, FSysName : array[0..MAX_PATH] of Char;
25 begin26 aPath := ExtractFileDrive( aPath) +'\';
27 Result := FALSE;
28 if GetVolumeInformation(
29 PChar( aPath),
30 VolName,
31 SizeOf( VolName),
32 nil,
33 maxClen,
34 driveFlags,
35 FsysName,
36 SizeOf( FsysName)
37 ) then38 Result := driveFlags and FS_PERSISTENT_ACLS = FS_PERSISTENT_ACLS ;
39 end;
40