/// <summary> /// 获取当前目录下明细(包含文件和文件夹) /// </summary> /// <returns></returns> public string[] GetFilesDetailList(string local) { try { var list = ftpConnection.List(local).ToList(); return(list.ToArray()); } catch { return(new string[] { }); } }
/// <summary> /// 获取当前目录下明细(包含文件和文件夹) /// </summary> /// <returns></returns> public string[] GetFilesDetailList(string local) { try { var list = new List <string>(); var client = new EACT.FTPClient(ftpConnection.ServerAddress, local, ftpConnection.UserName, ftpConnection.Password, ftpConnection.ServerPort); client.Connect(); if (client.Connected) { list = client.List(string.Empty).ToList(); client.DisConnect(); } return(list.ToArray()); } catch { return(new string[] { }); } }