mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
Added fsdevDeleteDirectoryRecursively
This commit is contained in:
parent
afaa33df2e
commit
1d3e208807
@ -48,5 +48,8 @@ int fsdevTranslatePath(const char *path, FsFileSystem** device, char *outpath);
|
||||
/// This calls fsFsSetArchiveBit on the filesystem specified by the input absolute path.
|
||||
Result fsdevSetArchiveBit(const char *path);
|
||||
|
||||
/// Recursively deletes the directory specified by the input absolute path.
|
||||
Result fsdevDeleteDirectoryRecursively(const char *path);
|
||||
|
||||
/// Unmounts all devices and cleans up any resources used by the FS driver.
|
||||
Result fsdevUnmountAll(void);
|
||||
|
@ -380,6 +380,16 @@ Result fsdevSetArchiveBit(const char *path) {
|
||||
return fsFsSetArchiveBit(&device->fs, fs_path);
|
||||
}
|
||||
|
||||
Result fsdevDeleteDirectoryRecursively(const char *path) {
|
||||
char fs_path[FS_MAX_PATH];
|
||||
fsdev_fsdevice *device = NULL;
|
||||
|
||||
if(fsdev_getfspath(_REENT, path, &device, fs_path)==-1)
|
||||
return MAKERESULT(Module_Libnx, LibnxError_NotFound);
|
||||
|
||||
return fsFsDeleteDirectoryRecursively(&device->fs, fs_path);
|
||||
}
|
||||
|
||||
/*! Initialize SDMC device */
|
||||
Result fsdevMountSdmc(void)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user