AI OnAI Off
UnifiedDirectory dir = UnifiedFileSystem.GetDirectory("/myshare");
UnifiedFile file = dir.CreateFile("Newfile.doc");
Stream s = file.OpenWrite();
try
{
//Write to stream here!
}
finally
{
s.Close();
}
So, you do not need to call any versioning functionality if you don't want to, it will create versions for you automatically. But, if you need to, you have all the functionality on the UnifiedFile class.
//check out
file.CheckOut();
// is it versioned
if(file.IsVersioned)
// check who checked it out
file.CheckedOutBy
//check in
file.CheckIn("Made some changes");
//get versions
UnifiedFileVersion []versions = file.GetVersions();
And so on..