Esempio n. 1
0
        internal ContentReader GetContentReader(string path, ContentReaderDynamicParameters parameters)
        {
            var item = cache.GetItem(path);

            if (item.Item.Type != FtpFileSystemObjectType.File)
            {
                throw new ArgumentOutOfRangeException(nameof(path), "Item is not a file.");
            }

            return(new ContentReader(item, parameters, cache.Client));
        }
Esempio n. 2
0
 public ContentReader(CacheNode item, ContentReaderDynamicParameters parameters, FtpClient client)
     : base(item, parameters, client)
 {
     decoder = Encoding?.GetDecoder();
     raw     = parameters?.Raw ?? false;
 }