locked
Possible to use NTFS alternative data streams?

    Question

  • I wonder if we can use the CreateFile("filename:stream") notation for files we have access to via user permission or is this not possible at the moment?
    Tuesday, December 11, 2012 9:54 AM

Answers

  • Hi Phil,

    You can use CreateFile2 only on files that you have direct access to. Your app cannot get direct access to files returned from the FilePicker. In that case a broker process accesses the files on your app's behalf and provides access to the data in the files.

    I discuss a bit more about this in Skip the path: stick to the StorageFile

    --Rob

    • Marked as answer by Jesse Jiang Tuesday, December 18, 2012 3:21 AM
    Tuesday, December 11, 2012 10:59 PM
    Owner

All replies

  • Hi Phil,

    You can use CreateFile2 only on files that you have direct access to. Your app cannot get direct access to files returned from the FilePicker. In that case a broker process accesses the files on your app's behalf and provides access to the data in the files.

    I discuss a bit more about this in Skip the path: stick to the StorageFile

    --Rob

    • Marked as answer by Jesse Jiang Tuesday, December 18, 2012 3:21 AM
    Tuesday, December 11, 2012 10:59 PM
    Owner
  • Thanks Rob. I guessed this would be the case. I have to say the broker approach MS took is way worse than what Apple did with their sandboxing. On OSX you can still use all the normal CRT i/o functions to access files the users has given you permission to. 

    And the broker on my system wastes a LOT of memory when accessing deep folder structures using folder.getFilesAsync(from, count). Also the sandboxing on W8 does not allow us to access hidden files in folders we have permission to enumerate. I learned that is "by design" - another bad design decision.

    Wednesday, December 12, 2012 7:20 AM