Code Monkey home page Code Monkey logo

Comments (4)

lukeblevins avatar lukeblevins commented on May 13, 2024 1

Absolutely! No legacy Windows APIs are used. This may be seen as an incedibly crummy solution, but I now do the following on startup:

  1. Gather a list of Removable Drives (USB flash drives and DVD drive) from KnownFolders.RemovableDevices
  2. Loop through ALL possible drive letters (excluding C:), checking if they can be accessed.
  3. Those that do not throw an exception are added to a collection.
  4. Everything in this collection is added as a NavigationViewItem, but if its drive letter corresponds to one in the list from step one, it is displayed to the user as "Removable". (Otherwise, it's another Local Disk)
    *This now excludes MTP devices because it requires some extra work to handle.
    drivedisplay

from files.

lukeblevins avatar lukeblevins commented on May 13, 2024

Hey there. I have a new solution coming very soon that addresses this problem. You'll be able to view everything that has a drive letter: partition, removable drive, or other local disks.
snipofdrives
Here's a snip of my PC which currently has a two local disks, the usual DVD, and one USB drive plugged in. Files will be able to recognize all of these. However, phone visibility requires extra support which I'm disabling for now.

from files.

neatorobito avatar neatorobito commented on May 13, 2024

Maybe outside the context of this issue, but I'm just curious as to how you solved this? I know that there are a limited amount of traditional Win32 APIs available for access to UWP apps. Did you use something like GetLogicalDrives?

from files.

lukeblevins avatar lukeblevins commented on May 13, 2024

Now available in v0.4.7

from files.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.