How to write string to hidden file?

Sciter Forums Native How to write string to hidden file?

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  Andrew 3 months ago.

  • Author
    Posts
  • #51357

    hello123
    Participant
    
    var data = {...};
    var stream = Stream.openFile( self.url("data.json"), "wu" );
    stream.printf("%V\n", data);
    

    I want to write the string to data.json,
    but data.json is hidden file, stream can not work.
    How should i do?

  • #51358

    Andrew
    Keymaster

    What does it mean “hidden file” ?

    The one that has FILE_ATTRIBUTE_HIDDEN ?
    Does it have FILE_ATTRIBUTE_READONLY also?

    • #51359

      hello123
      Participant

      Not have this property FILE_ATTRIBUTE_READONLY
      This file is only hidden.

    • #51360

      Andrew
      Keymaster

      Hmmm, for some reasons fopen() function on Windows does not allow to open hidden files…

You must be logged in to reply to this topic.