01: /*
02: * JFolder, Copyright 2001-2006 Gary Steinmetz
03: *
04: * Distributable under LGPL license.
05: * See terms of license at gnu.org.
06: */
07:
08: package org.jfolder.common.files;
09:
10: //base classes
11: import java.io.IOException;
12: import java.util.ArrayList;
13: import java.util.Collections;
14: import java.util.HashMap;
15: import java.util.HashSet;
16: import java.util.Iterator;
17: import java.util.zip.ZipEntry;
18: import java.util.zip.ZipInputStream;
19: import java.util.zip.ZipOutputStream;
20:
21: //project specific classes
22: import org.jfolder.common.UnexpectedSystemException;
23: import org.jfolder.common.utils.misc.MiscHelper;
24:
25: //other classes
26:
27: public interface VirtualFileSystemHolder {
28:
29: //
30: public final static String VALID_FILE_NAME = ".*";
31: public final static String VALID_DIRECTORY_NAME = ".*";
32: public final static char DIRECTORY_SEPARATOR_CHAR = '/';
33: public final static String DIRECTORY_SEPARATOR = DIRECTORY_SEPARATOR_CHAR
34: + "";
35: //
36: public final static String ROOT_DIRECTORY_PATH = "/";
37: public final static String ROOT_DIRECTORY_LOCAL_NAME = "";
38:
39: //
40: public boolean isDirectoryOrFilePresent(String inName);
41:
42: public boolean isDirectoryPresent(String inName);
43:
44: public boolean isFilePresent(String inName);
45:
46: //
47: public VirtualFileSystemDirectory getDirectory(String inName);
48:
49: public VirtualFileSystemFile getFile(String inName);
50:
51: //
52: public ArrayList getLocalDirectories();
53:
54: public ArrayList getLocalFiles();
55:
56: //
57: public VirtualFileSystemDirectory copyDirectory(String inSource,
58: String inDestination);
59:
60: public VirtualFileSystemDirectory createDirectory(String inName);
61:
62: public VirtualFileSystemDirectory getOrCreateLocalDirectory(
63: String inName);
64:
65: public boolean isAbsoluteDirectoryPresent(String inName);
66:
67: public boolean isFileBlockingAbsoluteDirectory(String inName);
68:
69: public VirtualFileSystemHolder getOrCreateAbsoluteDirectory(
70: String inName);
71:
72: public VirtualFileSystemFile createFile(String inName,
73: byte inContent[]);
74:
75: //
76: public VirtualFileSystemFile getAbsoluteFile(String inName);
77:
78: public boolean isAbsoluteFilePresent(String inName);
79:
80: //
81: public void removeDirectory(String inName);
82:
83: public void removeFile(String inName);
84:
85: //
86: public void updateFile(String inName, byte inContent[]);
87:
88: //
89: public int hashCode();
90:
91: public boolean equals(Object inObject);
92:
93: }
|