FileFind.Meshwork.Search.SearchResult.Download C# (CSharp) Method

Download() public method

public Download ( ) : void
return void
        public void Download()
        {
            if (Type == SearchResultType.File) {
                // FIXME: Find other sources for file!

                var path = PathUtil.Join(m_Node.Directory.FullPath, m_Listing.FullPath);
                Core.FileSystem.BeginGetFileDetails(path, delegate (IFile file) {
                    m_Node.Network.DownloadFile(m_Node, (RemoteFile)file);
                });
            } else {
                throw new InvalidOperationException("Cannot download directories");
            }
        }