/// <inheritdoc />
        public async Task <IDocument> CopyToAsync(ICollection collection, string name, CancellationToken cancellationToken)
        {
            var dir            = (DotNetDirectory)collection;
            var targetFileName = System.IO.Path.Combine(dir.DirectoryInfo.FullName, name);

            File.Copy(FileInfo.FullName, targetFileName, true);
            var fileInfo = new FileInfo(targetFileName);
            var doc      = new DotNetFile(dir.DotNetFileSystem, dir, fileInfo, dir.Path.Append(fileInfo.Name, false));

            var sourcePropStore = FileSystem.PropertyStore;
            var destPropStore   = collection.FileSystem.PropertyStore;

            if (sourcePropStore != null && destPropStore != null)
            {
                var sourceProps = await sourcePropStore.GetAsync(this, cancellationToken);

                await destPropStore.RemoveAsync(doc, cancellationToken);

                await destPropStore.SetAsync(doc, sourceProps, cancellationToken);
            }
            else if (destPropStore != null)
            {
                await destPropStore.RemoveAsync(doc, cancellationToken);
            }

            return(doc);
        }
        /// <inheritdoc />
        public async Task <IDocument> MoveToAsync(ICollection collection, string name, CancellationToken cancellationToken)
        {
            var sourcePropStore = FileSystem.PropertyStore;
            var destPropStore   = collection.FileSystem.PropertyStore;

            IReadOnlyCollection <XElement> sourceProps;

            if (sourcePropStore != null && destPropStore != null)
            {
                sourceProps = await sourcePropStore.GetAsync(this, cancellationToken);
            }
            else
            {
                sourceProps = null;
            }

            var dir            = (DotNetDirectory)collection;
            var targetFileName = System.IO.Path.Combine(dir.DirectoryInfo.FullName, name);

            if (File.Exists(targetFileName))
            {
                File.Delete(targetFileName);
            }
            File.Move(FileInfo.FullName, targetFileName);
            var fileInfo = new FileInfo(targetFileName);
            var doc      = new DotNetFile(dir.DotNetFileSystem, dir, fileInfo, dir.Path.Append(fileInfo.Name, false));

            if (destPropStore != null)
            {
                await destPropStore.RemoveAsync(doc, cancellationToken);

                if (sourceProps != null)
                {
                    await destPropStore.SetAsync(doc, sourceProps, cancellationToken);
                }
            }

            return(doc);
        }