TorrentHardLinkHelper.Locate.TorrentFileLocater.Locate C# (CSharp) Method

Locate() public method

public Locate ( ) : LocateResult
return LocateResult
        public LocateResult Locate()
        {
            if (this._torrent == null)
            {
                throw new ArgumentException("Torrent cannot be null.");
            }
            if (this._fsfiFileInfos == null || this._fsfiFileInfos.Count == 0)
            {
                throw new ArgumentException("FsFileInfos cannot be null or zero");
            }

            this.FindTorrentFileLinks();
            this.ConfirmFileSystemFiles();
            return new LocateResult(this._torrentFileLinks);
        }

Usage Example

Ejemplo n.º 1
0
        public void TestLocate1()
        {
            string sourceFolder = @"I:\[BDMV][アニメ] ココロコネクト";
            string torrentPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "TestTorrents", "[U2].13680.torrent");

            IList<FileSystemFileInfo> fileInfos = GetFileSystemInfos(sourceFolder);
            var torrent = Torrent.Load(torrentPath);
            var locater = new TorrentFileLocater(torrent, fileInfos);

            var result = locater.Locate();
        }
All Usage Examples Of TorrentHardLinkHelper.Locate.TorrentFileLocater::Locate