Examples of DirlogEntry


Examples of cu.ftpd.modules.dirlog.DirlogEntry

                    max = 10;
                }
            }
            it = dirlog.getLatestDirs(max);
            while (it.hasNext()) {
                DirlogEntry de = it.next();
                connection.respond(de.getFiles() + ";" + de.getSize() + ";" + de.getTime() + ";" + escape(de.getPath()));

            }
            connection.respond("200 SITE NEW RAW");
        } else {
            connection.respond(createHeader());
            connection.respond(String.format(lineFormat, Formatter.getBar(), "Files", "Size", "Age", "Directory", Formatter.getBar()));
            connection.respond(Formatter.createLine(200));
            if (parameterList.length > 1) {
                try {
                    max = Integer.parseInt(parameterList[1]);
                } catch (NumberFormatException e) {
                    max = 10;
                }
            }
            it = dirlog.getLatestDirs(max);
            while (it.hasNext()) {
                DirlogEntry de = it.next();
                connection.respond(String.format(lineFormat, Formatter.getBar(), de.getFiles(), Formatter.size(de.getSize()), Formatter.shortDuration((System.currentTimeMillis() - de.getTime()) / 1000), de.getPath(), Formatter.getBar()));

            }
            connection.respond(Formatter.createFooter(200));
        }
    }
View Full Code Here

Examples of cu.ftpd.modules.dirlog.DirlogEntry

        this.dirlog = dirlog;
        //noCheck = Pattern.compile("cd\\d|disc\\d");
        noCheck = Pattern.compile(noCheckPattern);
        Iterator<DirlogEntry> it = dirlog.getLatestDirs(Long.MAX_VALUE);
        while (it.hasNext()) {
            DirlogEntry dirlogEntry = it.next();
            String name = new File(dirlogEntry.getPath()).getName();
            entries.put(name, dirlogEntry);
        }
    }
View Full Code Here

Examples of cu.ftpd.modules.dirlog.DirlogEntry

        if (noCheck.matcher(name).matches()) {
            // only check if it is not called "cd1" etc
            return true;
        } else {
            //DirlogEntry de = Logging.getDirlog().quickContains(name);
            DirlogEntry de = entries.get(name);
            if (de != null) {
                connection.respond("500 A directory by that name already exists: " + de.getPath());
                return false;
            }
            return true;
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.