EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Using file tags

Posted: 03/13/2008 13:56:00
by Dan Cooper (Standard support level)
Joined: 06/27/2007
Posts: 125

Are there any examples of using file tags to store data against a file?

For example, how should I store and retrieve a boolean against the file in C#?
Posted: 03/14/2008 11:10:01
by Eugene Mayevski (Team)

Something like this (writing from memory so certain errors are possible):

byte[] b = new byte[1];
b[0] = (byte) MyBoolValue;
SetFileTag("\MyFile.txt", 12345 /* tag ID */, b, 1);

and the same in the opposite direction:

byte[] b = new byte[1];
int TagSize;
try {

TagSize = GetFileTag("\MyFile.txt, 12345, b, 1);
if (TagSize == 1) // we can trust the value of b
MyBool = b[0] != 0;
catch (ESolFSError e)
// no tag or tag ID invalid or ...

Sincerely yours
Eugene Mayevski



Topic viewed 2774 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!