getfattrib
Original Reporter info from Mantis: FPCCore
-
Reporter name: FPC core team
Original Reporter info from Mantis: FPCCore
- Reporter name: FPC core team
Description:
// please see this
function isDir(s:string):boolean;
var F: file;
Attr: Word;
begin
if (pos('\\',copy(s,2,255))<>0) or (s='\\') then Exit(false);
Assign(F, s);
GetFAttr(F, Attr);
if DosError <> 0 then isDir:=false
else if Attr and directory = 0 then isDir:=false
else isDir:=true;
end;
begin
write(isdir('c:\temp\pr\'));
end.
where 'c:\temp\pr' is my directory: it EXIST
output is:
Go32v2: False GetFAttr is incorrect (update 2002/08/25)
Win32 : True OK (as BP7) (update 2002/08/27)
--------------------
with this
begin
write(isdir('c:\temp\pr'));
end.
output is:
Go32v2: True OK
Win32 : True OK
Additional information:
Reporter: Salvatore Licciardi
EMail: turylicciardi at tiscalinet dot it
Mantis conversion info:
- Mantis ID: 4144
- OS: GO32V2
- Version: 1.0.6
- Fixed in version: N/A