This project is read-only.




I checked out your code to make see why the root folder under iOS is the Library folder.
            var documents = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
            var localAppData = Path.Combine(documents, "..", "Library");
The default on iOS is set to the documents folder which makes sense when looking at apple's documentation.

Also, looking at Xamarin's page on handling files using the forms platform:
Again the default seems to be the documents folder.

Also, In the case we want the Library Folder (specifically for ios), we should be able to write iOS specific code in order to get that folder.
For instance, we might create an SQLite database in the library folder.
But it is important to use of the documents folder for user-generated content (pictures, videos, pdfs, other file types) within the documents folder.
It doesn't make much sense the library applying an overhead to access the library folder only for us to add another in order to get back to the documents folder.

        Device.OnPlatform(() => {
            string path = PortablePath.Combine (FileSystem.Current.LocalStorage.Path, "..", "Documents");
            Debug.WriteLine (path);


IoanHancu wrote Jan 13, 2015 at 10:02 PM

Another example of something we should not have to do (eliminating the double backtracking caused by the 2 calls to Combine - first in the library 2nd in app code)
        Device.OnPlatform(() => {
            string path = FileSystem.Current.LocalStorage.Path.Split(new [] {PortablePath.DirectorySeparatorChar + ".."}, StringSplitOptions.RemoveEmptyEntries).First();
It should be (in the case we want the library folder, which is an iOS specific thing)
        Device.OnPlatform(() => {
            string path = PortablePath.Combine (FileSystem.Current.LocalStorage.Path, "..", "Library");