locked
How to create a hidden file in metro ?

    General discussion

  • If I use windows::storage api  to create a storageFile

    After the storageFile has been created, how do I set this file's attribute be hidden?

    I can not find any api in storaeFile can do this, is there any way can achieve this goal?

    Thanks for help.

    Thursday, September 06, 2012 6:19 AM

All replies

  • There is no way to set this.

    What is the scenario you need this for? If a user shouldn't see the file then it should go in the app's data storage. This is area is not readily viewable by users. If the file is elsewhere in the system then the user should be aware of it and it shouldn't be hidden.

    --Rob

    Thursday, September 06, 2012 4:47 PM
    Owner
  • Hi Rob,

    It is needed when you need to create files that will be shared across multiple applications but those being stored a user shouldn't see in Explorer or File Picker.

    In otherwords if I store it in AppData then only that app can read those files.  But I want another app to startup and see those files. 

    thanks,

    rob

    Tuesday, October 02, 2012 5:52 PM
  • Using hidden files as a backdoor interprocess communication isn't a supported scenario. Windows Store apps should be standalone and can communicate with other apps only through well defined contracts. They should store app-specific data in their app data section. One of the goals of Windows Store apps is that they are predictable and can be completely uninstalled without leaving debris such as hidden files on the system.

    Only user documents should be stored in user facing areas.

    --Rob

    Wednesday, October 03, 2012 2:38 AM
    Owner