Beispiel #1
0
        public bool IsContentIdEqual(FSItem i)
        {
            if (string.IsNullOrWhiteSpace(i?.ContentId) || string.IsNullOrWhiteSpace(ContentId))
            {
                return(false);
            }

            return(ContentId == i.ContentId);
        }
Beispiel #2
0
 public FSItem(FSItem item)
 {
     IsUploading    = item.IsUploading;
     Path           = item.Path;
     Id             = item.Id;
     IsDir          = item.IsDir;
     Length         = item.Length;
     LastAccessTime = item.LastAccessTime;
     LastWriteTime  = item.LastWriteTime;
     CreationTime   = item.CreationTime;
     ParentIds      = new ConcurrentBag <string>(item.ParentIds);
 }
Beispiel #3
0
            public FSItem Build()
            {
                if (ParentPath == null)
                {
                    throw new NullReferenceException("ParentPath should be set");
                }

                var result = new FSItem
                {
                    Id             = Id,
                    CreationTime   = CreationTime,
                    IsDir          = IsDir,
                    LastAccessTime = LastAccessTime,
                    LastWriteTime  = LastWriteTime,
                    Length         = Length,
                    ParentIds      = new ConcurrentBag <string>(ParentIds),
                    Path           = (ParentPath != string.Empty) ? System.IO.Path.Combine(ParentPath, Name) : "\\" + Name
                };

                return(result);
            }