EldoS | Feel safer!

Software components for data protection, secure storage and transfer

issue with SolFSStream mode "w"

Posted: 03/04/2014 01:50:17
by Jeremy Spiegel (Standard support level)
Joined: 01/29/2014
Posts: 30

According to the documentation, creating a SolFSStream with mode "w" should succeed if the file already exists and just empty the file's existing contents: "Write mode. Creates new empty file for output. If a file with the same name already exists, its contents are discarded."

However, I'm seeing the library return an error when trying to open a SolFSStream with mode "w" on a file that already exists, rather open the file as new. My code is:
        SolFSStorage storage;
        SolFSStream(&storage, "/file", "w").Write("abcd", 4);
        SolFSStream(&storage, "/file", "w").Write("efgh", 4);

The above throws error -5 "File or directory already exists". Thanks.



Topic viewed 2799 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!