예제 #1
0
파일: FSItem.cs 프로젝트: nguyendotuong/sse
        public bool IsContentIdEqual(FSItem i)
        {
            if (string.IsNullOrWhiteSpace(i?.ContentId) || string.IsNullOrWhiteSpace(ContentId))
            {
                return(false);
            }

            return(ContentId == i.ContentId);
        }
예제 #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);
 }
예제 #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);
            }