예제 #1
0
 // Token: 0x0600133F RID: 4927 RVA: 0x00070650 File Offset: 0x0006E850
 public void Detach(FileStream file)
 {
     FileSet.FileItem fileItem = this.files.Find((FileSet.FileItem otherItem) => otherItem.File == file);
     if (fileItem != null)
     {
         fileItem.Delete = false;
         FileSet.Tracer.TraceDebug <string>((long)this.GetHashCode(), "FileSet: Detached file {0}", fileItem.Name);
     }
 }
예제 #2
0
 // Token: 0x06001340 RID: 4928 RVA: 0x000706A8 File Offset: 0x0006E8A8
 public void Attach(string filePath)
 {
     FileSet.Tracer.TraceDebug <string>((long)this.GetHashCode(), "FileSet: Attaching file {0}", filePath);
     FileSet.FileItem item = new FileSet.FileItem
     {
         Name   = filePath,
         File   = null,
         Delete = true
     };
     this.files.Add(item);
 }
예제 #3
0
        // Token: 0x0600133E RID: 4926 RVA: 0x000705C8 File Offset: 0x0006E7C8
        public FileStream Create(string id)
        {
            string     text       = Path.Combine(Globals.AlternateTempFilePath, id + Path.GetRandomFileName());
            FileStream fileStream = File.Open(text, FileMode.Create, FileAccess.ReadWrite);

            FileSet.Tracer.TraceDebug <string>((long)this.GetHashCode(), "FileSet: Created temporary file {0}", text);
            FileSet.FileItem item = new FileSet.FileItem
            {
                Name   = text,
                File   = fileStream,
                Delete = true
            };
            this.files.Add(item);
            return(fileStream);
        }