public MlsxEntry mlst ( String fileName ) throws IOException , ServerException { try { Reply reply = controlChannel . execute ( new Command ( "MLST" , fileName ) ) ; String replyMessage = reply . getMessage ( ) ; StringTokenizer replyLines = new StringTokenizer ( replyMessage , System . getProperty ( "line.separator" ) ) ; if ( replyLines . hasMoreElements ( ) ) { replyLines . nextElement ( ) ; } else { throw new FTPException ( FTPException . UNSPECIFIED , "Expected multiline reply" ) ; } if ( replyLines . hasMoreElements ( ) ) { String line = ( String ) replyLines . nextElement ( ) ; return new MlsxEntry ( line ) ; } else { throw new FTPException ( FTPException . UNSPECIFIED , "Expected multiline reply" ) ; } } catch ( FTPReplyParseException rpe ) { throw ServerException . embedFTPReplyParseException ( rpe ) ; } catch ( UnexpectedReplyCodeException urce ) { throw ServerException . embedUnexpectedReplyCodeException ( urce , "Server refused MLST command" ) ; } catch ( FTPException e ) { ServerException ce = new ServerException ( ClientException . UNSPECIFIED , "Could not create MlsxEntry" ) ; ce . setRootCause ( e ) ; throw ce ; } }
Get info of a certain remote file in Mlsx format .