mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 23:42:34 +02:00
+ implemented MkDir for the WASI target
git-svn-id: trunk@49525 -
This commit is contained in:
parent
bc08af99b0
commit
144d7ed978
@ -19,8 +19,19 @@
|
|||||||
*****************************************************************************}
|
*****************************************************************************}
|
||||||
|
|
||||||
procedure Do_MkDir(s: rawbytestring);
|
procedure Do_MkDir(s: rawbytestring);
|
||||||
|
var
|
||||||
|
fd: __wasi_fd_t;
|
||||||
|
pr: PChar;
|
||||||
|
res: __wasi_errno_t;
|
||||||
begin
|
begin
|
||||||
DebugWriteLn('Do_MkDir');
|
if not ConvertToFdRelativePath(PChar(s),fd,pr) then
|
||||||
|
exit;
|
||||||
|
res:=__wasi_path_create_directory(fd,pr,StrLen(pr));
|
||||||
|
if res=__WASI_ERRNO_SUCCESS then
|
||||||
|
InOutRes:=0
|
||||||
|
else
|
||||||
|
InOutRes:=Errno2InoutRes(res);
|
||||||
|
FreeMem(pr);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Do_RmDir(s: rawbytestring);
|
procedure Do_RmDir(s: rawbytestring);
|
||||||
|
Loading…
Reference in New Issue
Block a user