1 module libwasm.bindings.FileSystemDirectoryEntry; 2 3 import libwasm.types; 4 5 import memutils.ct: tuple; 6 import libwasm.bindings.FileSystem; 7 import libwasm.bindings.FileSystemDirectoryReader; 8 import libwasm.bindings.FileSystemEntry; 9 10 @safe: 11 nothrow: 12 13 struct FileSystemDirectoryEntry { 14 nothrow: 15 libwasm.bindings.FileSystemEntry.FileSystemEntry _parent; 16 alias _parent this; 17 this(Handle h) { 18 _parent = .FileSystemEntry(h); 19 } 20 auto createReader()() { 21 return FileSystemDirectoryReader(Object_Getter__Handle(this._parent, "createReader")); 22 } 23 void getFile(T0)(scope auto ref Optional!(T0) path, scope ref FileSystemFlags options, FileSystemEntryCallback successCallback, ErrorCallback errorCallback) if (isTOrPointer!(T0, string)) { 24 FileSystemDirectoryEntry_getFile(this._parent, !path.empty, path.front, options.handle, successCallback, errorCallback); 25 } 26 void getFile(T0)(scope auto ref Optional!(T0) path, scope ref FileSystemFlags options, FileSystemEntryCallback successCallback) if (isTOrPointer!(T0, string)) { 27 FileSystemDirectoryEntry_getFile_0(this._parent, !path.empty, path.front, options.handle, successCallback); 28 } 29 void getFile(T0)(scope auto ref Optional!(T0) path, scope ref FileSystemFlags options) if (isTOrPointer!(T0, string)) { 30 Serialize_Object_VarArgCall!void(this._parent, "getFile", "Optional!(string);Handle", tuple(!path.empty, path.front, cast(Handle)options.handle)); 31 } 32 void getFile(T0)(scope auto ref Optional!(T0) path) if (isTOrPointer!(T0, string)) { 33 Serialize_Object_VarArgCall!void(this._parent, "getFile", "Optional!(string)", tuple(!path.empty, path.front)); 34 } 35 void getFile()() { 36 Object_Call__void(this._parent, "getFile"); 37 } 38 void getDirectory(T0)(scope auto ref Optional!(T0) path, scope ref FileSystemFlags options, FileSystemEntryCallback successCallback, ErrorCallback errorCallback) if (isTOrPointer!(T0, string)) { 39 FileSystemDirectoryEntry_getDirectory(this._parent, !path.empty, path.front, options.handle, successCallback, errorCallback); 40 } 41 void getDirectory(T0)(scope auto ref Optional!(T0) path, scope ref FileSystemFlags options, FileSystemEntryCallback successCallback) if (isTOrPointer!(T0, string)) { 42 FileSystemDirectoryEntry_getDirectory_0(this._parent, !path.empty, path.front, options.handle, successCallback); 43 } 44 void getDirectory(T0)(scope auto ref Optional!(T0) path, scope ref FileSystemFlags options) if (isTOrPointer!(T0, string)) { 45 Serialize_Object_VarArgCall!void(this._parent, "getDirectory", "Optional!(string);Handle", tuple(!path.empty, path.front, cast(Handle)options.handle)); 46 } 47 void getDirectory(T0)(scope auto ref Optional!(T0) path) if (isTOrPointer!(T0, string)) { 48 Serialize_Object_VarArgCall!void(this._parent, "getDirectory", "Optional!(string)", tuple(!path.empty, path.front)); 49 } 50 void getDirectory()() { 51 Object_Call__void(this._parent, "getDirectory"); 52 } 53 } 54 55 56 extern (C) void FileSystemDirectoryEntry_getFile(Handle, bool, string, Handle, FileSystemEntryCallback, ErrorCallback); 57 extern (C) void FileSystemDirectoryEntry_getFile_0(Handle, bool, string, Handle, FileSystemEntryCallback); 58 extern (C) void FileSystemDirectoryEntry_getDirectory(Handle, bool, string, Handle, FileSystemEntryCallback, ErrorCallback); 59 extern (C) void FileSystemDirectoryEntry_getDirectory_0(Handle, bool, string, Handle, FileSystemEntryCallback);