mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 13:39:36 +02:00
+ implemented RmDir for the WASI target
git-svn-id: trunk@49526 -
This commit is contained in:
parent
144d7ed978
commit
0af333bd0f
@ -35,8 +35,19 @@ begin
|
||||
end;
|
||||
|
||||
procedure Do_RmDir(s: rawbytestring);
|
||||
var
|
||||
fd: __wasi_fd_t;
|
||||
pr: PChar;
|
||||
res: __wasi_errno_t;
|
||||
begin
|
||||
DebugWriteLn('Do_RmDir');
|
||||
if not ConvertToFdRelativePath(PChar(s),fd,pr) then
|
||||
exit;
|
||||
res:=__wasi_path_remove_directory(fd,pr,StrLen(pr));
|
||||
if res=__WASI_ERRNO_SUCCESS then
|
||||
InOutRes:=0
|
||||
else
|
||||
InOutRes:=Errno2InoutRes(res);
|
||||
FreeMem(pr);
|
||||
end;
|
||||
|
||||
procedure do_ChDir(s: rawbytestring);
|
||||
|
Loading…
Reference in New Issue
Block a user