Monodroid Environment variables

后端 未结 2 894
野趣味
野趣味 2021-02-09 17:20

In Android there are a collection of Environment paths available at Android.OS.Environment. However, when keeping cross platform capabilities in mind, I want to store pictures

2条回答
  •  我在风中等你
    2021-02-09 17:52

    After stepping through some code, I've summarised the locations given by Xamarin Android for each of the different System.Environment variables below. I don't have an iOS project available, but if anyone could post the iOS equivalents I'd be grateful.

    ApplicationData         "/data/data/ProjectName.ProjectName/files/.config"
    CommonApplicationData   "/usr/share"
    CommonProgramFiles      ""
    Cookies                 ""
    Desktop                 "/data/data/ProjectName.ProjectName/files/Desktop"
    DesktopDirectory        "/data/data/ProjectName.ProjectName/files/Desktop"
    Favorites               ""
    History                 ""
    InternetCache           ""
    LocalApplicationData    "/data/data/ProjectName.ProjectName/files/.local/share"
    MyComputer              ""
    MyDocuments             "/data/data/ProjectName.ProjectName/files"
    MyMusic                 "/data/data/ProjectName.ProjectName/files/Music"
    MyPictures              "/data/data/ProjectName.ProjectName/files/Pictures"
    MyVideos                "/data/data/ProjectName.ProjectName/files/Videos"
    Personal                "/data/data/ProjectName.ProjectName/files"
    ProgramFiles            ""
    Programs                ""
    Recent                  ""
    SendTo                  ""
    StartMenu               ""
    Startup                 ""
    System                  ""
    Templates               "/data/data/ProjectName.ProjectName/files/Templates"
    

提交回复
热议问题