locked
Can StorageFolder.Attributes include ReadOnly?

    Question

  • When I use StorageFolder.Attributes on a read-only folder, it shows only one attribute - Directory.  Is the read-only attribute supported by Windows Store app?

    Hong

    Thursday, February 13, 2014 2:58 PM

Answers

  • Hi Jamles,

    I have realized this is likely an issue of Windows 8, not Windows Store app API. In other words, the information provided by the File Explorer of Windows 8 is wrong.


    Hong

    Friday, February 14, 2014 2:37 AM

All replies

  • I have just found something relevant and puzzling.

    There are two folders both of which show read-only attribute in File Explorer (right-click the folder > Properties):

    E:\Temp

    E:\Temp\foo

    However, StorageFolder.Attributes shows "ReadOnly|Directory" for E:\Temp, but only "Directory" for E:\Temp\foo.


    Hong

    Thursday, February 13, 2014 3:37 PM
  • Hi Hong,

    Setting a folder to read-only makes all the files in the folder read-only. It does not affect the folder itself. Is there some read-only files exist on your E:\Temp folder?

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Friday, February 14, 2014 2:23 AM
    Moderator
  • Hi Jamles,

    I have realized this is likely an issue of Windows 8, not Windows Store app API. In other words, the information provided by the File Explorer of Windows 8 is wrong.


    Hong

    Friday, February 14, 2014 2:37 AM
  • Hi Hong,

    Thank you for your confirmation.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Friday, February 14, 2014 5:27 AM
    Moderator