diff --git a/nx/include/switch/runtime/devices/fs_dev.h b/nx/include/switch/runtime/devices/fs_dev.h index b80467db..da17640b 100644 --- a/nx/include/switch/runtime/devices/fs_dev.h +++ b/nx/include/switch/runtime/devices/fs_dev.h @@ -42,5 +42,8 @@ FsFileSystem* fsdevGetDeviceFileSystem(const char *name); /// Returns the FsFileSystem for the default device (SD card), if mounted. Used internally by romfs_dev. FsFileSystem* fsdevGetDefaultFileSystem(void); +/// This calls fsFsSetArchiveBit on the filesystem specified by the input absolute path. +Result fsdevSetArchiveBit(const char *path); + /// Unmounts all devices and cleans up any resources used by the FS driver. Result fsdevUnmountAll(void); diff --git a/nx/source/runtime/devices/fs_dev.c b/nx/source/runtime/devices/fs_dev.c index 69064419..b01ac1a4 100644 --- a/nx/source/runtime/devices/fs_dev.c +++ b/nx/source/runtime/devices/fs_dev.c @@ -368,6 +368,16 @@ Result fsdevCommitDevice(const char *name) return fsFsCommit(&device->fs); } +Result fsdevSetArchiveBit(const char *path) { + fsdev_fsdevice *device; + + device = fsdevFindDevice(path); + if(device==NULL) + return MAKERESULT(Module_Libnx, LibnxError_NotFound); + + return fsFsSetArchiveBit(&device->fs, path); +} + /*! Initialize SDMC device */ Result fsdevMountSdmc(void) {