Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Delete Image from Pictures folder

$
0
0

Hi,

I have tke photo with the Xamarin.Plugin.Media module.
When the app start, I would delete these images but, the app cannot find the path.

Unhandled Exception:
System.IO.DirectoryNotFoundException: Could not find a part of the path '/data/user/0/com.sdea.SDEA_SurveillanceOuvrages/files/Pictures'.

protected override void OnStart ()
{
    // Handle when your app starts
    GestFiles gf = new GestFiles();
    string picturesPath = Environment.GetFolderPath(Environment.SpecialFolder.MyPictures);

    foreach (string filename in System.IO.Directory.GetFiles(picturesPath))
        gf.FileDelete(filename);
}

Thanks for help :)


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>