mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-28 17:00:40 +02:00
* IOCheck/InOutRes check for mkdir,chdir and rmdir like in TP
+ do_isdevice implemented
This commit is contained in:
parent
b8f38be993
commit
02a7a189cb
@ -264,6 +264,16 @@ begin
|
|||||||
if p[i]='/' then p[i]:='\';
|
if p[i]='/' then p[i]:='\';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function do_isdevice(handle:longint):boolean;
|
||||||
|
begin
|
||||||
|
if (handle=stdoutputhandle) or (handle=stdinputhandle) or
|
||||||
|
(handle=stderrorhandle) then
|
||||||
|
do_isdevice:=FALSE;
|
||||||
|
else
|
||||||
|
do_isdevice:=TRUE;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure do_close(h:longint);
|
procedure do_close(h:longint);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -565,22 +575,25 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure mkdir(const s : string);
|
procedure mkdir(const s : string);[IOCheck];
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
If InOutRes <> 0 then exit;
|
||||||
DosDir($39,s);
|
DosDir($39,s);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure rmdir(const s : string);
|
procedure rmdir(const s : string);[IOCheck];
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
If InOutRes <> 0 then exit;
|
||||||
DosDir($3a,s);
|
DosDir($3a,s);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure chdir(const s : string);
|
procedure chdir(const s : string);[IOCheck];
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
If InOutRes <> 0 then exit;
|
||||||
DosDir($3b,s);
|
DosDir($3b,s);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user