/** * Returns an array of strings naming the files and directories in the directory denoted by this * abstract pathname. * * <p>There is no guarantee that the name strings in the resulting array will appear in any * specific order; they are not, in particular, guaranteed to appear in alphabetical order. * * <p>If this GeneralFile object denotes a file, the results are unspecified. * * @return An array of strings naming the files and directories in the directory denoted by this * abstract pathname. */ public String[] list() { try { // TODO which list? Vector list = ftpClient.list(getPath()); Object[] listO = list.toArray(); String[] listS = new String[listO.length]; for (int i = 0; i < listO.length; i++) { listS[i] = listO[i].toString(); } return listS; } catch (IOException e) { return null; } catch (FTPException e) { return null; } }