public IList<IActivityIOPath> ListFoldersInDirectory(IActivityIOPath src)
{
List<string> dirs;
try
{
var tmpDirData = ExtendedDirList(src.Path, src.Username, src.Password, EnableSsl(src),
src.IsNotCertVerifiable,src.PrivateKeyFile);
dirs = ExtractDirectoryList(src.Path, tmpDirData);
// remove the this directory ;)
dirs.Remove(".");
// remove th directory up too ;)
dirs.Remove("..");
}
catch(Exception ex)
{
Dev2Logger.Log.Error(this, ex);
string message = string.Format("{0} : [{1}]", ex.Message, src.Path);
throw new Exception(message, ex);
}
return dirs.Select(dir => BuildValidPathForFtp(src, dir)).Select(uri => ActivityIOFactory.CreatePathFromString(uri, src.Username, src.Password, src.PrivateKeyFile)).ToList();
}