internal IEnumerable <WebRoute> ListFolder() { if (request is HttpWebRequest) { throw new NotImplementedException(); } if (request is FileWebRequest) { DirectoryInfo dir = new DirectoryInfo(request.RequestUri.LocalPath); return(dir.GetFiles("*", new EnumerationOptions() { RecurseSubdirectories = true }).Select(f => WebRoute.Create(new Uri("file://" + f.FullName), Convert.ToUInt64(f.Length)))); } if (request is FtpWebRequest) { throw new NotImplementedException(); } if (request is S3WebRequest) { return(ListFolder((S3WebRequest)request.CloneRequest(request.RequestUri))); } return(null); }
public async Task <Stream> GetStreamAsync(long start, long end = -1) { return(await WebRoute.Create(Uri).GetStreamAsync(start, end)); }
public async Task <Stream> GetStreamAsync() { return(await WebRoute.Create(Uri).GetStreamAsync()); }