Пример #1
0
 public void EnsureExistsOnDisk(DiskSaveItem saveItem)
 {
     LocalFileCache local = new LocalFileCache();
     local.SaveLocalItem(saveItem);
 }
Пример #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="item"></param>
 public void SaveLocalItem(DiskSaveItem item)
 {
     FileInfo writeToFile = new FileInfo(Path.Combine(LocalFileCachePath, item.SubDirectory, item.FileName));
     Directory.CreateDirectory(writeToFile.DirectoryName);
     File.WriteAllBytes(writeToFile.FullName, item.FileContents);
 }