Пример #1
0
 Option <FilePath> InvokedTransfer(Option <FilePath> result, NodeFlow flow, SystemResourceUrn urn)
 {
     result.Map(
         file => C.Notify(Inform($"{flow.SourceNode}:{file.FileName} ==> {flow.TargetNode}")),
         () => C.Notify(result.Message));
     return(result);
 }
Пример #2
0
 public Option <P> UncFilePath(N n, SystemResourceUrn urn)
 => from parentUrn in urn.ParentName
 from subject in  Catalog.TryFindSubject(parentUrn)
 let filename = FileName.Parse(urn.NonSchemeComponents.Last())
                select UncShare(n, subject).Share.SharePath + filename;
Пример #3
0
 public Option <CatalogSubject> TryFindSubject(SystemResourceUrn urn)
 => CatalogState.SubjectUrnIndex.TryFind(urn);
Пример #4
0
 public NodeUncDrive(NodeUncDrive Parent, SystemResourceUrn Urn)
     : this(new NodeUncShare(Parent.Node, Parent.Root, Parent.Share.SharePath + Urn), Parent.Root, Parent.DriveLetter)
 {
 }
Пример #5
0
 public FilePath FilePath(SystemResourceUrn Urn)
 => SharePath.GetCombinedFilePath(Urn);
Пример #6
0
 Option <FilePath> INodeFileSystemChannel.TransferFile(NodeFlow flow, SystemResourceUrn urn)
 => InvokedTransfer(TransferFile(flow, urn), flow, urn);
Пример #7
0
 Option <FilePath> TransferFile(NodeFlow flow, SystemResourceUrn urn)
 => from srcFile in Locator.UncFilePath(flow.SourceNode, urn)
 from dstFile in Locator.UncFilePath(flow.TargetNode, urn)
 from result in srcFile.CopyTo(dstFile)
 select result;