Copy link to clipboard
Copied
I have used the below code, but it is not working:
IDFile file;
FileUtils::GetAppLocalCachedDataFolder(&file,"InDesign Recovery");
file.Delete();
Someone help me out!
Copy link to clipboard
Copied
The delete method delete an empty directory, are you sure the directory is empty. I am quoting the method header below for your reference
/**
Deletes the file or directory from the file system. \\
If a directory, it must be empty (contain no files or folders).
To delete a non-empty directory, call CoreFileUtils::DeleteDirectory().
@return True if successfully deleted, else false.
*/
-Manan
Copy link to clipboard
Copied
not able to delete a file in folder
Copy link to clipboard
Copied
If you need to delete a file in this folder then you are still doing it wrong, the call to the GetAppLocalCachedDataFolder would find the InDesign Recovery folder inside the LocalCache folder and if it is not present it will create it. So if your file is present inside the InDesign Recovery folder you need to add the path to that file to the IDFile you send as an argument to GetAppLocalCachedDataFolder
I think the AppendName method should work, you can look into the AFile.h header file for functions that will allow you to append the path component till the file you want to delete to the folder IDFile you have.
-Manan
Copy link to clipboard
Copied
thanks it works
Find more inspiration, events, and resources on the new Adobe Community
Explore Now