Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

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.

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, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

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

  • Options
    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.

  • Options

    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.