From d5b8c5f5aab9df6bd75f77fa8a3ccfaddd03af40 Mon Sep 17 00:00:00 2001 From: Andreas Fankhauser hiddenalpha.ch Date: Tue, 17 Feb 2026 14:39:44 +0100 Subject: Add `FileSystem_unlink()` --- include/qntan/Qntan.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'include/qntan') diff --git a/include/qntan/Qntan.h b/include/qntan/Qntan.h index b54b73a..0407385 100644 --- a/include/qntan/Qntan.h +++ b/include/qntan/Qntan.h @@ -492,6 +492,9 @@ struct Qntan_File { #ifndef Qntan_FileSystem_mkdir # define Qntan_FileSystem_mkdir(A, ...) (*A)->mkdir(A, __VA_ARGS__) #endif +#ifndef Qntan_FileSystem_unlink +# define Qntan_FileSystem_unlink(A, ...) (*A)->unlink(A, __VA_ARGS__) +#endif #ifndef Qntan_FileSystem_rename # define Qntan_FileSystem_rename(A, ...) (*A)->rename(A, __VA_ARGS__) #endif @@ -537,9 +540,12 @@ struct Qntan_FileSystem { // void (*create)( struct Qntan_FileSystem**, const char*path, mode_t mode, // struct fuse_file_info*, void(*onDone)(int, Qntan_Cls), Qntan_Cls); // /**/ -// void (*unlink)( struct Qntan_FileSystem**, const char*path, -// void(*onDone)(int, Qntan_Cls), Qntan_Cls); -// /**/ + void (*unlink)( struct Qntan_FileSystem**, const char*path, + void(*onDone)(int, Qntan_Cls), Qntan_Cls); + /* Same idea as + * "https://pubs.opengroup.org/onlinepubs/009696799/functions/unlink.html" + * just using an async API. + */ // void (*truncate)( struct Qntan_FileSystem**, char const*path, off_t size, // void(*onDone)(int, Qntan_Cls), Qntan_Cls); // /* TODO There's a duplicate in 'File' of this function. -- cgit v1.3.1