Hello everyone.

We have decided to phase out the Mixed Reality Forums over the next few months in favor of other ways to connect with us.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

The plan between now and the beginning of May is to clean up old, unanswered questions that are no longer relevant. The forums will remain open and usable.

On May 1st we will be locking the forums to new posts and replies. They will remain available for another three months for the purposes of searching them, and then they will be closed altogether on August 1st.

So, where does that leave our awesome community to ask questions? Well, there are a few places we want to engage with you. For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality. If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers. And always feel free to hit us up on Twitter @MxdRealityDev.

System.IO.Directory.Exists("C:\\") is False

When built to HoloLens, this returns True:
System.IO.Directory.Exists(System.IO.Directory.GetCurrentDirectory())

but this returns False:
System.IO.Directory.Exists(System.IO.Path.GetPathRoot(System.IO.Directory.GetCurrentDirectory));

System.IO.Path.GetPathRoot(System.IO.Directory.GetCurrentDirectory) evaluates to C:. I don't understand how C:\ could fail to exist on HoloLens: What am I doing wrong?

My end goal is to grab all .jpg files from HoloLens and display them to the user through a browser interface implemented in Unity/C#.

Thank you for your thoughts.

Comments

  • sallysally
    edited December 2017

    I will answer myself with some newfound knowledge:

    This will always be the case on Mobile devices (such as HoloLens) when permissions are not requested by the App. Be sure to check off access in the build settings to things like "CameraRoll" to grab JPGs created by the Camera. As for "all the JPGs on HoloLens", other JPGs (such as images from the web) are not actually on HoloLens, but rather stored in OneDrive.

  • I don't think this is necessarily specific to HoloLens, I suspect it's more specific to Universal Windows Applications built on the Universal Windows Platform (UWP).

    UWP places restrictions on how an application accesses the file system - documented https://docs.microsoft.com/en-us/windows/uwp/files/file-access-permissions - and an application can't just access a location like the root of the system drive as that's perhaps viewed as offering the application a little too much privilege.

    This would be true for any UWP app whether it's for HoloLens or running on a PC or Surface Hub or other type of device.

    Hope that helps.

Sign In or Register to comment.