Browse Source

nodejs: comments

mattias 6 years ago
parent
commit
c076afa3aa
1 changed files with 8 additions and 2 deletions
  1. 8 2
      packages/nodejs/nodejsfs.pas

+ 8 - 2
packages/nodejs/nodejsfs.pas

@@ -70,6 +70,7 @@ type
     //Mode : TMode;
     //Mode : TMode;
     //FindData : TFindData;
     //FindData : TFindData;
   end;
   end;
+  TUnicodeSearchRec = TSearchRec;
 
 
 function FindFirst(const Path: String; Attr : Longint; out Rslt: TSearchRec): Longint;
 function FindFirst(const Path: String; Attr : Longint; out Rslt: TSearchRec): Longint;
 function FindNext(var Rslt: TSearchRec): Longint;
 function FindNext(var Rslt: TSearchRec): Longint;
@@ -340,9 +341,14 @@ type
     // utimesSync(path, atime, mtime)
     // utimesSync(path, atime, mtime)
     // watch(filename[, options][, listener])
     // watch(filename[, options][, listener])
     // watchFile(filename[, options], listener)
     // watchFile(filename[, options], listener)
-    procedure writeFileSync(aFile: jsvalue; // string | buffer | URL | filedescriptor
+    procedure writeFileSync(
+      aFile: jsvalue; // string | buffer | URL | filedescriptor
+      Data: jsvalue // string | buffer | typedarray | DataView
+      );
+    procedure writeFileSync(
+      aFile: jsvalue; // string | buffer | URL | filedescriptor
       Data: jsvalue; // string | buffer | typedarray | DataView
       Data: jsvalue; // string | buffer | typedarray | DataView
-      const Options: TNJSWriteFileOpts);
+      const Options: TJSObject{TNJSWriteFileOpts});
     function writeSync(fd: TNJSFileDesc;
     function writeSync(fd: TNJSFileDesc;
       buffer: jsvalue; // buffer | TypedArray | DataView
       buffer: jsvalue; // buffer | TypedArray | DataView
       Offset, Count, Position: NativeInt): NativeInt;
       Offset, Count, Position: NativeInt): NativeInt;