Esempio n. 1
0
 public void GetLatestReplaceFile(FileDataLocation fileLocation, DateTime fileTime, bool?exists, bool?checkedOut)
 {
     if (exists == null)
     {
         exists = fileSystem.Exists(fileLocation.LocalPath);
     }
     fileSystem.WriteAllBytes(fileLocation.LocalPath, fileLocation.Data);
     if (fileTime != DateTime.MinValue)
     {
         fileSystem.SetLastWriteTimeUtc(fileLocation.LocalPath, fileTime);
     }
     if (!(checkedOut.HasValue && checkedOut.Value))
     {
         fileSystem.SetAttributes(fileLocation.LocalPath, FileAttributes.ReadOnly);
     }
 }
Esempio n. 2
0
 public void GetLatestReplaceFile(FileDataLocation fileLocation, DateTime fileTime, bool? exists, bool? checkedOut)
 {
     if (exists == null)
         exists = fileSystem.Exists(fileLocation.LocalPath);
     fileSystem.WriteAllBytes(fileLocation.LocalPath, fileLocation.Data);
     if (fileTime != DateTime.MinValue) {
         fileSystem.SetLastWriteTimeUtc(fileLocation.LocalPath, fileTime);
     }
     if (!(checkedOut.HasValue && checkedOut.Value)) {
         fileSystem.SetAttributes(fileLocation.LocalPath, FileAttributes.ReadOnly);
     }
 }