public UploadData getFile(SerializedVersion serV) { FBVersion ver = FBVersion.deserialize(serV.encodedVersion); PhysicFile found = null; if (ver.fileList.Count != 1) { return(null); } foreach (FBFile file in ver.fileList) { found = findPhysicFile(file); if (found == null) { return(null); } } FileStream fStream = new FileStream(found.getRealFileInfo().FullName, FileMode.Open, FileAccess.Read); String token = Server.GetUniqueKey(20); var secDown = new SecureDownloader(this, token, null, null, fStream); return(new UploadData(UsefullMethods.GetLocalIPAddress(), secDown.port, token)); }
public void ManageCompleteUpload(FBFile f, PhysicFile pf, string token) { this.uploadedFiles.add(pf); this.necessaryFiles.Remove(f); SecureChannel chan; this.channels.TryRemove(token, out chan); }
public void delete(PhysicFile pf) { list.Remove(pf); }
public void add(PhysicFile pf) { list.Add(pf); }
public bool Equals(PhysicFile pf) { return this.abstractFile.Equals(pf.abstractFile); }
public void delete(PhysicFile pf) { lock(this) list.Remove(pf); }
public void add(PhysicFile pf) { lock(this) list.Add(pf); }
public bool Equals(PhysicFile pf) { return(this.abstractFile.Equals(pf.abstractFile)); }
public void delete(PhysicFile pf) { lock (this) list.Remove(pf); }
public void add(PhysicFile pf) { lock (this) list.Add(pf); }