mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-22 04:52:39 +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.
|
/// This calls fsFsSetArchiveBit on the filesystem specified by the input absolute path.
|
||||||
Result fsdevSetArchiveBit(const char *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.
|
/// Unmounts all devices and cleans up any resources used by the FS driver.
|
||||||
Result fsdevUnmountAll(void);
|
Result fsdevUnmountAll(void);
|
||||||
|
@ -380,6 +380,16 @@ Result fsdevSetArchiveBit(const char *path) {
|
|||||||
return fsFsSetArchiveBit(&device->fs, fs_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 */
|
/*! Initialize SDMC device */
|
||||||
Result fsdevMountSdmc(void)
|
Result fsdevMountSdmc(void)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user