public bool IsContentIdEqual(FSItem i) { if (string.IsNullOrWhiteSpace(i?.ContentId) || string.IsNullOrWhiteSpace(ContentId)) { return(false); } return(ContentId == i.ContentId); }
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); }
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); }