Beispiel #1
0
 private void AddDelete(VirtualPath path)
 {
     if (this.deletes.Add(path.ChangeDrive(null)))
     {
         this.WriteDeletes();
     }
 }
Beispiel #2
0
        private void RemoveDelete(VirtualPath path)
        {
            bool modified = false;
            var  p        = path.ChangeDrive(null);

            while (p.Elements.Count > 0)
            {
                modified |= this.deletes.Remove(p);
                p         = p.GetParent();
            }

            if (modified)
            {
                this.WriteDeletes();
            }
        }
Beispiel #3
0
        private ExtendedErrorCode IsDeleted(VirtualPath path)
        {
            var p = path.ChangeDrive(null);
            int n = 0;

            while (p.Elements.Count > 0)
            {
                if (this.deletes.Contains(p))
                {
                    return(n > 0 ? ExtendedErrorCode.PathNotFound : ExtendedErrorCode.FileNotFound);
                }

                p = p.GetParent();
                n++;
            }

            return(ExtendedErrorCode.NoError);
        }
Beispiel #4
0
 private string GetArchivePath(VirtualPath path) => path.ChangeDrive(this.Drive).ToString();
Beispiel #5
0
 private string GetArchivePath(VirtualPath path)
 {
     return(path.ChangeDrive(this.Drive).ToString());
 }