Beispiel #1
0
        private Task UploadFinished(UploadInfo item, FSItem.Builder node)
        {
            onStatisticsUpdated(cloud, StatisticUpdateReason.UploadFinished, new UploadStatisticInfo(item));

            var newitem = node.SetParentPath(Path.GetDirectoryName(item.Path)).Build();

            itemsTreeCache.Update(newitem);

            return(Task.FromResult(0));
        }
Beispiel #2
0
        internal FSItem ToFSItem()
        {
            var result = new FSItem.Builder()
            {
                Id         = Id,
                Name       = System.IO.Path.GetFileName(Path),
                Length     = Length,
                ParentIds  = new ConcurrentBag <string>(new[] { ParentId }),
                ParentPath = System.IO.Path.GetDirectoryName(Path)
            }.Build();

            result.MakeUploading();
            return(result);
        }