Package org.apache.ftpserver.listing

Examples of org.apache.ftpserver.listing.MLSTFileFormater


            boolean failure = false;
            try {
                // parse argument
                ListArgument parsedArg = ListArgumentParser.parse(request.getArgument());
               
                FileFormater formater = new MLSTFileFormater((String[])session.getAttribute("MLST.types"));
               
                dataConnection.transferToClient(directoryLister.listFiles(parsedArg, session.getFileSystemView(), formater));
            }
            catch(SocketException ex) {
                LOG.debug("Socket exception during data transfer", ex);
View Full Code Here


       
        FileObject file = null;
        try {
            file = session.getFileSystemView().getFileObject(parsedArg.getFile());
            if(file != null && file.doesExist()) {
                FileFormater formater = new MLSTFileFormater((String[])session.getAttribute("MLST.types"));
                session.write(FtpReplyUtil.translate(session, request, context, FtpReply.REPLY_250_REQUESTED_FILE_ACTION_OKAY, "MLST", formater.format(file)));
            } else {           
                session.write(FtpReplyUtil.translate(session, request, context, FtpReply.REPLY_501_SYNTAX_ERROR_IN_PARAMETERS_OR_ARGUMENTS, "MLST", null));
            }
        }
        catch(FtpException ex) {
View Full Code Here

        FileObject file = null;
        try {
            file = session.getFileSystemView().getFileObject(
                    parsedArg.getFile());
            if (file != null && file.doesExist()) {
                FileFormater formater = new MLSTFileFormater((String[]) session
                        .getAttribute("MLST.types"));
                session.write(FtpReplyUtil.translate(session, request, context,
                        FtpReply.REPLY_250_REQUESTED_FILE_ACTION_OKAY, "MLST",
                        formater.format(file)));
            } else {
                session
                        .write(FtpReplyUtil
                                .translate(
                                        session,
View Full Code Here

            try {
                // parse argument
                ListArgument parsedArg = ListArgumentParser.parse(request
                        .getArgument());

                FileFormater formater = new MLSTFileFormater((String[]) session
                        .getAttribute("MLST.types"));

                dataConnection.transferToClient(directoryLister.listFiles(
                        parsedArg, session.getFileSystemView(), formater));
            } catch (SocketException ex) {
View Full Code Here

TOP

Related Classes of org.apache.ftpserver.listing.MLSTFileFormater

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.