Programmatically access files on android device from PC

后端 未结 1 1208
醉话见心
醉话见心 2020-12-16 06:15

I have a C# application that will need to access files that are on my android tablet, obviously I can just use the mounted drive letter for the storage but I will be deployi

相关标签:
1条回答
  • 2020-12-16 06:40

    Here's what I came up with for you to maybe start with.

    var drives = DriveInfo.GetDrives();
    
    var removableFatDrives = drives.Where(
            c=>c.DriveType == DriveType.Removable &&
            c.DriveFormat == "FAT" && 
            c.IsReady);
    
    var andriods = from c in removableFatDrives
                   from d in c.RootDirectory.EnumerateDirectories()
                   where d.Name.Contains("android")
                   select c;
    
    0 讨论(0)
提交回复
热议问题