|
@@ -28,6 +28,7 @@ interface
|
|
|
uses
|
|
|
wasiapi;
|
|
|
|
|
|
+{$DEFINE OS_FILESETDATEBYNAME}
|
|
|
{$DEFINE HAS_SLEEP}
|
|
|
{$DEFINE HAS_GETTICKCOUNT64}
|
|
|
|
|
@@ -481,6 +482,24 @@ begin
|
|
|
end;
|
|
|
|
|
|
|
|
|
+Function FileSetDate (Const FileName : RawByteString; Age : Int64) : Longint;
|
|
|
+var
|
|
|
+ pr: RawByteString;
|
|
|
+ fd: __wasi_fd_t;
|
|
|
+begin
|
|
|
+ if not ConvertToFdRelativePath(FileName,fd,pr) then
|
|
|
+ begin
|
|
|
+ result:=-1;
|
|
|
+ exit;
|
|
|
+ end;
|
|
|
+ if __wasi_path_filestat_set_times(fd,0,PChar(pr),length(pr),Age*1000000000,Age*1000000000,
|
|
|
+ __WASI_FSTFLAGS_MTIM or __WASI_FSTFLAGS_ATIM)=__WASI_ERRNO_SUCCESS then
|
|
|
+ result:=0
|
|
|
+ else
|
|
|
+ result:=-1;
|
|
|
+end;
|
|
|
+
|
|
|
+
|
|
|
Function FileGetAttr (Const FileName : RawByteString) : Longint;
|
|
|
begin
|
|
|
end;
|