01: /*
02: * This file is part of the QuickServer library
03: * Copyright (C) 2003-2005 QuickServer.org
04: *
05: * Use, modification, copying and distribution of this software is subject to
06: * the terms and conditions of the GNU Lesser General Public License.
07: * You should have received a copy of the GNU LGP License along with this
08: * library; if not, you can download a copy from <http://www.quickserver.org/>.
09: *
10: * For questions, suggestions, bug-reports, enhancement-requests etc.
11: * visit http://www.quickserver.org
12: *
13: */
14:
15: package ftpserver;
16:
17: import org.quickserver.net.*;
18: import org.quickserver.net.server.*;
19:
20: import java.io.*;
21: import java.util.*;
22: import java.util.logging.*;
23:
24: public class FtpServer {
25: public static String version = "0.3";
26:
27: public static void main(String args[]) {
28: QuickServer ftpServer = new QuickServer();
29:
30: String confFile = "conf" + File.separator + "FtpServer.xml";
31: Object config[] = new Object[] { confFile };
32: if (ftpServer.initService(config) == true) {
33: try {
34: ftpServer.startServer();
35: ftpServer.startQSAdminServer();
36: } catch (AppException e) {
37: System.out.println("Error in server : " + e);
38: e.printStackTrace();
39: }
40: }
41: }
42:
43: private static void usage() {
44: System.err.println("---------------------------\n"
45: + "QuickFTPServer v " + version + " Usage \n"
46: + "---------------------------\n" + "ftpserver help\n"
47: + "\tDisplays this help screen.\n"
48: + "ftpserver [ftp_root_dir]\n" + "\tDefault are \n"
49: + "\t Dir : User Home Dir");
50: }
51: }
|