London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
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..