Beispiel #1
0
        public override async Task <IEnumerable <ClientItem> > GetFileListing(string path)
        {
            path = Controller.AbsolutePath(path);

            var list = default(FtpListItem[]);

            try
            {
                list = await _ftpc.GetListingAsync(path);
            }
            catch (FtpCommandException ex) when(ex.ResponseType == FtpResponseType.TransientNegativeCompletion)
            {
                Log.Write(l.Warning, $"retrying to list files inside directory: {path}");
                list = await _ftpc.GetListingAsync(path);
            }

            return(Array.ConvertAll(list.ToArray(), ConvertItem));
        }
Beispiel #2
0
        public override async Task <IEnumerable <ClientItem> > GetFileListing(string path)
        {
            var list = await _ftpc.GetListingAsync(path);

            return(Array.ConvertAll(list.ToArray(), ConvertItem));
        }