01: package org.drftpd.slave.async;
02:
03: import java.io.File;
04:
05: import org.drftpd.remotefile.CaseInsensitiveHashtable;
06:
07: /**
08: * @author zubov
09: * @version $Id: AsyncResponseRemerge.java 999 2005-02-12 20:29:35Z teflon $
10: */
11: public class AsyncResponseRemerge extends AsyncResponse {
12: private CaseInsensitiveHashtable _files;
13: private String _directory;
14:
15: public AsyncResponseRemerge(String directory,
16: CaseInsensitiveHashtable files) {
17: super ("Remerge");
18: _files = files;
19: if (File.separatorChar == '\\') { // stupid win32 hack
20: directory = directory.replaceAll("\\\\", "/");
21: }
22: if (directory.indexOf('\\') != -1) {
23: throw new RuntimeException(
24: "\\ is not an acceptable character in a directory path");
25: }
26: _directory = directory;
27: }
28:
29: public String getDirectory() {
30: return _directory;
31: }
32:
33: public CaseInsensitiveHashtable getFiles() {
34: return _files;
35: }
36:
37: public String toString() {
38: return getClass().getName() + "[path=" + getDirectory() + "]";
39: }
40: }
|