I have pushed a file into my SDCard folder and from my application, I am trying to delete the file , but I am getting result as E_ILLEGAL_ACCESS. The following is the piece of code I have used,
String modifyName;
Directory* pDir;
DirEnumerator* pDirEnum;
result r = E_SUCCESS;
Tizen::Base::String dirName = Tizen::System::Environment::GetExternalStoragePath();
AppLog("Memory Card Path : %ls",dirName.GetPointer());
pDir = new Directory;
r = pDir->Construct(dirName);
pDirEnum = pDir->ReadN();
while (pDirEnum->MoveNext() == E_SUCCESS)
{
DirEntry entry = pDirEnum->GetCurrentDirEntry();
if(entry.IsDirectory())
{
}
else
{
r = Tizen::Io::File::Remove("/opt/storage/sdcard/6.JPG");
if(r == E_SUCCESS)
{
AppLog("File Deleted");
}
else if (r == E_INVALID_ARG)
{
AppLog("E_INVALID_ARG");
}
else if (r == E_ILLEGAL_ACCESS)
{
AppLog("E_ILLEGAL_ACCESS");
}
else if (r == E_FILE_NOT_FOUND)
{
AppLog("E_FILE_NOT_FOUND");
}
else if (r == E_IO)
{
AppLog("E_IO");
}
}
}
I am trying to delete the 6.JPG file from the opt/storage/sdcard path. FYI, I am using Tizen 2.1 (Emulator)and I have switched to root mode.
I couldn’t understand why I am getting ILLEGAL_ACCESS error.
File not deleting from External Storage
I have pushed a file into my SDCard folder and from my application, I am trying to delete the file , but I am getting result as E_ILLEGAL_ACCESS. The following is the piece of code I have used,
I am trying to delete the 6.JPG file from the opt/storage/sdcard path. FYI, I am using Tizen 2.1 (Emulator)and I have switched to root mode.
I couldn’t understand why I am getting ILLEGAL_ACCESS error.
BY
16 Apr 2025
Tizen Studio
BY
04 Nov 2024
Tizen Studio
BY
02 Apr 2024
Tizen Studio