001
014
015 package com.liferay.portal.kernel.util;
016
017 import java.io.IOException;
018 import java.io.InputStream;
019 import java.io.Reader;
020
021 import java.util.List;
022 import java.util.Properties;
023
024
028 public interface File {
029
030 public void copyDirectory(java.io.File source, java.io.File destination)
031 throws IOException;
032
033 public void copyDirectory(String sourceDirName, String destinationDirName)
034 throws IOException;
035
036 public void copyFile(java.io.File source, java.io.File destination)
037 throws IOException;
038
039 public void copyFile(
040 java.io.File source, java.io.File destination, boolean lazy)
041 throws IOException;
042
043 public void copyFile(String source, String destination) throws IOException;
044
045 public void copyFile(String source, String destination, boolean lazy)
046 throws IOException;
047
048 public java.io.File createTempFile();
049
050 public java.io.File createTempFile(byte[] bytes) throws IOException;
051
052 public java.io.File createTempFile(InputStream is) throws IOException;
053
054 public java.io.File createTempFile(String extension);
055
056 public java.io.File createTempFile(String prefix, String extension);
057
058 public String createTempFileName();
059
060 public String createTempFileName(String extension);
061
062 public String createTempFileName(String prefix, String extension);
063
064 public java.io.File createTempFolder();
065
066 public String decodeSafeFileName(String fileName);
067
068 public boolean delete(java.io.File file);
069
070 public boolean delete(String file);
071
072 public void deltree(java.io.File directory);
073
074 public void deltree(String directory);
075
076 public String encodeSafeFileName(String fileName);
077
078 public boolean exists(java.io.File file);
079
080 public boolean exists(String fileName);
081
082 public String extractText(InputStream is, String fileName);
083
084 public String extractText(
085 InputStream is, String fileName, int maxStringLength);
086
087 public String[] find(String directory, String includes, String excludes);
088
089 public String getAbsolutePath(java.io.File file);
090
091 public byte[] getBytes(Class<?> clazz, String fileName) throws IOException;
092
093 public byte[] getBytes(InputStream is) throws IOException;
094
095 public byte[] getBytes(InputStream is, int bufferSize) throws IOException;
096
097 public byte[] getBytes(
098 InputStream inputStream, int bufferSize, boolean cleanUpStream)
099 throws IOException;
100
101 public byte[] getBytes(java.io.File file) throws IOException;
102
103 public String getExtension(String fileName);
104
105 public String getMD5Checksum(java.io.File file) throws IOException;
106
107 public String getPath(String fullFileName);
108
109 public String getShortFileName(String fullFileName);
110
111 public boolean isAscii(java.io.File file) throws IOException;
112
113 public boolean isSameContent(java.io.File file, byte[] bytes, int length);
114
115 public boolean isSameContent(java.io.File file, String s);
116
117 public String[] listDirs(java.io.File file);
118
119 public String[] listDirs(String fileName);
120
121 public String[] listFiles(java.io.File file);
122
123 public String[] listFiles(String fileName);
124
125 public void mkdirs(String pathName);
126
127 public boolean move(java.io.File source, java.io.File destination);
128
129 public boolean move(String sourceFileName, String destinationFileName);
130
131 public String read(java.io.File file) throws IOException;
132
133 public String read(java.io.File file, boolean raw) throws IOException;
134
135 public String read(String fileName) throws IOException;
136
137 public String replaceSeparator(String fileName);
138
139 public java.io.File[] sortFiles(java.io.File[] files);
140
141 public String stripExtension(String fileName);
142
143 public List<String> toList(Reader reader);
144
145 public List<String> toList(String fileName);
146
147 public Properties toProperties(java.io.FileInputStream fis);
148
149 public Properties toProperties(String fileName);
150
151 public void touch(java.io.File file) throws IOException;
152
153 public void touch(String fileName) throws IOException;
154
155 public void unzip(java.io.File source, java.io.File destination);
156
157 public void write(java.io.File file, byte[] bytes) throws IOException;
158
159 public void write(java.io.File file, byte[] bytes, boolean append)
160 throws IOException;
161
162 public void write(java.io.File file, byte[] bytes, int offset, int length)
163 throws IOException;
164
165 public void write(
166 java.io.File file, byte[] bytes, int offset, int length,
167 boolean append)
168 throws IOException;
169
170 public void write(java.io.File file, InputStream is) throws IOException;
171
172 public void write(java.io.File file, String s) throws IOException;
173
174 public void write(java.io.File file, String s, boolean lazy)
175 throws IOException;
176
177 public void write(java.io.File file, String s, boolean lazy, boolean append)
178 throws IOException;
179
180 public void write(String fileName, byte[] bytes) throws IOException;
181
182 public void write(String fileName, InputStream is) throws IOException;
183
184 public void write(String fileName, String s) throws IOException;
185
186 public void write(String fileName, String s, boolean lazy)
187 throws IOException;
188
189 public void write(String fileName, String s, boolean lazy, boolean append)
190 throws IOException;
191
192 public void write(String pathName, String fileName, String s)
193 throws IOException;
194
195 public void write(String pathName, String fileName, String s, boolean lazy)
196 throws IOException;
197
198 public void write(
199 String pathName, String fileName, String s, boolean lazy,
200 boolean append)
201 throws IOException;
202
203 }