|
@@ -4,83 +4,66 @@ |
4 |
4 |
|
import java.nio.channels.*; |
5 |
5 |
|
|
6 |
6 |
|
@SuppressWarnings({"UnusedDeclaration"}) |
7 |
|
- |
public class FileUtil extends Util |
8 |
|
- |
{ |
|
7 |
+ |
public class FileUtil extends Util { |
9 |
8 |
|
public static final File CANONICAL_USER_DIR; |
10 |
9 |
|
|
11 |
|
- |
static |
12 |
|
- |
{ |
13 |
|
- |
try |
14 |
|
- |
{ |
|
10 |
+ |
static { |
|
11 |
+ |
try { |
15 |
12 |
|
CANONICAL_USER_DIR = new File( System.getProperty( "user.dir" ) ).getCanonicalFile(); |
16 |
13 |
|
} |
17 |
|
- |
catch ( IOException e ) |
18 |
|
- |
{ |
|
14 |
+ |
catch ( IOException e ) { |
19 |
15 |
|
throw new Error( e ); |
20 |
16 |
|
} |
21 |
17 |
|
} |
22 |
18 |
|
|
23 |
|
- |
private static final IFileSystem FILE_SYSTEM = new IFileSystem() |
24 |
|
- |
{ |
|
19 |
+ |
private static final IFileSystem FILE_SYSTEM = new IFileSystem() { |
25 |
20 |
|
@Override |
26 |
|
- |
public boolean isWindows() |
27 |
|
- |
{ |
|
21 |
+ |
public boolean isWindows() { |
28 |
22 |
|
return isWindows; |
29 |
23 |
|
} |
30 |
24 |
|
|
31 |
25 |
|
@Override |
32 |
|
- |
public char separatorChar() |
33 |
|
- |
{ |
|
26 |
+ |
public char separatorChar() { |
34 |
27 |
|
return File.separatorChar; |
35 |
28 |
|
} |
36 |
29 |
|
|
37 |
30 |
|
@Override |
38 |
|
- |
public String canonicalCurrentPath() |
39 |
|
- |
{ |
|
31 |
+ |
public String canonicalCurrentPath() { |
40 |
32 |
|
return CANONICAL_USER_DIR.getPath(); |
41 |
33 |
|
} |
42 |
34 |
|
|
43 |
35 |
|
@Override |
44 |
|
- |
public boolean exists( String path ) |
45 |
|
- |
{ |
|
36 |
+ |
public boolean exists( String path ) { |
46 |
37 |
|
return new File( path ).exists(); |
47 |
38 |
|
} |
48 |
39 |
|
|
49 |
40 |
|
@Override |
50 |
|
- |
public String canonicalizeNormalizedExisting( String path ) |
51 |
|
- |
{ |
|
41 |
+ |
public String canonicalizeNormalizedExisting( String path ) { |
52 |
42 |
|
File zFile = new File( path ); |
53 |
|
- |
if ( zFile.exists() ) |
54 |
|
- |
{ |
|
43 |
+ |
if ( zFile.exists() ) { |
55 |
44 |
|
return getCanonicalPath( zFile ); |
56 |
45 |
|
} |
57 |
46 |
|
throw new WrappedIOException( new FileNotFoundException( path ) ); |
58 |
47 |
|
} |
59 |
48 |
|
}; |
60 |
49 |
|
|
61 |
|
- |
public static File assertExists( String pWhat, File pToTest ) |
62 |
|
- |
{ |
|
50 |
+ |
public static File assertExists( String pWhat, File pToTest ) { |
63 |
51 |
|
assertNotNull( pWhat, pToTest ); |
64 |
|
- |
if ( !pToTest.exists() ) |
65 |
|
- |
{ |
|
52 |
+ |
if ( !pToTest.exists() ) { |
66 |
53 |
|
throw new IllegalArgumentException( pWhat + " not found: " + pToTest.getAbsolutePath() ); |
67 |
54 |
|
} |
68 |
55 |
|
return pToTest; |
69 |
56 |
|
} |
70 |
57 |
|
|
71 |
|
- |
public static File assertIsFile( String pWhat, File pToTest ) |
72 |
|
- |
{ |
73 |
|
- |
if ( !assertExists( pWhat, pToTest ).isFile() ) |
74 |
|
- |
{ |
|
58 |
+ |
public static File assertIsFile( String pWhat, File pToTest ) { |
|
59 |
+ |
if ( !assertExists( pWhat, pToTest ).isFile() ) { |
75 |
60 |
|
throw new IllegalArgumentException( pWhat + " not a file: " + pToTest.getAbsolutePath() ); |
76 |
61 |
|
} |
77 |
62 |
|
return pToTest; |
78 |
63 |
|
} |
79 |
64 |
|
|
80 |
|
- |
public static File assertIsDirectory( String pWhat, File pToTest ) |
81 |
|
- |
{ |
82 |
|
- |
if ( !assertExists( pWhat, pToTest ).isDirectory() ) |
83 |
|
- |
{ |
|
65 |
+ |
public static File assertIsDirectory( String pWhat, File pToTest ) { |
|
66 |
+ |
if ( !assertExists( pWhat, pToTest ).isDirectory() ) { |
84 |
67 |
|
throw new IllegalArgumentException( pWhat + " not a directory: " + pToTest.getAbsolutePath() ); |
85 |
68 |
|
} |
86 |
69 |
|
return pToTest; |
|
@@ -89,50 +72,39 @@ |
89 |
72 |
|
/** |
90 |
73 |
|
* Reads to the end of the input stream and writes the bytes to the output stream. |
91 |
74 |
|
*/ |
92 |
|
- |
public static void copyStreamAndCloseEm( InputStream input, OutputStream output ) |
93 |
|
- |
{ |
94 |
|
- |
try |
95 |
|
- |
{ |
|
75 |
+ |
public static void copyStreamAndCloseEm( InputStream input, OutputStream output ) { |
|
76 |
+ |
try { |
96 |
77 |
|
writeStream( input, output ); |
97 |
78 |
|
} |
98 |
|
- |
finally |
99 |
|
- |
{ |
|
79 |
+ |
finally { |
100 |
80 |
|
dispose( input ); |
101 |
81 |
|
} |
102 |
82 |
|
} |
103 |
83 |
|
|
104 |
|
- |
public static void writeStream( InputStream input, OutputStream output ) |
105 |
|
- |
{ |
106 |
|
- |
try |
107 |
|
- |
{ |
|
84 |
+ |
public static void writeStream( InputStream input, OutputStream output ) { |
|
85 |
+ |
try { |
108 |
86 |
|
append( input, output ); |
109 |
87 |
|
Closeable zCloseable = output; |
110 |
88 |
|
output = null; |
111 |
89 |
|
close( zCloseable ); |
112 |
90 |
|
} |
113 |
|
- |
finally |
114 |
|
- |
{ |
|
91 |
+ |
finally { |
115 |
92 |
|
dispose( output ); |
116 |
93 |
|
} |
117 |
94 |
|
} |
118 |
95 |
|
|
119 |
|
- |
public static void append( InputStream input, OutputStream output ) |
120 |
|
- |
{ |
|
96 |
+ |
public static void append( InputStream input, OutputStream output ) { |
121 |
97 |
|
assertNotNull( "input", input ); |
122 |
98 |
|
assertNotNull( "output", output ); |
123 |
99 |
|
byte[] buf = new byte[1024]; |
124 |
|
- |
try |
125 |
|
- |
{ |
126 |
|
- |
for ( int len; (len = input.read( buf )) > -1; ) |
127 |
|
- |
{ |
128 |
|
- |
if ( len != 0 ) |
129 |
|
- |
{ |
|
100 |
+ |
try { |
|
101 |
+ |
for ( int len; (len = input.read( buf )) > -1; ) { |
|
102 |
+ |
if ( len != 0 ) { |
130 |
103 |
|
output.write( buf, 0, len ); |
131 |
104 |
|
} |
132 |
105 |
|
} |
133 |
106 |
|
} |
134 |
|
- |
catch ( IOException e ) |
135 |
|
- |
{ |
|
107 |
+ |
catch ( IOException e ) { |
136 |
108 |
|
throw new WrappedIOException( e ); |
137 |
109 |
|
} |
138 |
110 |
|
} |
|
@@ -141,34 +113,28 @@ |
141 |
113 |
|
* Copies one file to another. |
142 |
114 |
|
*/ |
143 |
115 |
|
@SuppressWarnings({"ResultOfMethodCallIgnored"}) |
144 |
|
- |
public static void copyFile( File in, File out ) |
145 |
|
- |
{ |
|
116 |
+ |
public static void copyFile( File in, File out ) { |
146 |
117 |
|
assertNotNull( "in", in ); |
147 |
118 |
|
assertNotNull( "out", out ); |
148 |
119 |
|
LOGGER.trace.log( "Copying file: ", in, " -> ", out ); |
149 |
120 |
|
FileChannel sourceChannel = createFileInputStream( in ).getChannel(); |
150 |
121 |
|
out.getParentFile().mkdirs(); |
151 |
|
- |
try |
152 |
|
- |
{ |
|
122 |
+ |
try { |
153 |
123 |
|
FileChannel destinationChannel = createFileOutputStream( out ).getChannel(); |
154 |
|
- |
try |
155 |
|
- |
{ |
|
124 |
+ |
try { |
156 |
125 |
|
sourceChannel.transferTo( 0, sourceChannel.size(), destinationChannel ); |
157 |
126 |
|
Closeable zCloseable = destinationChannel; |
158 |
127 |
|
destinationChannel = null; |
159 |
128 |
|
close( zCloseable ); |
160 |
129 |
|
} |
161 |
|
- |
catch ( IOException e ) |
162 |
|
- |
{ |
|
130 |
+ |
catch ( IOException e ) { |
163 |
131 |
|
throw new WrappedIOException( e ); |
164 |
132 |
|
} |
165 |
|
- |
finally |
166 |
|
- |
{ |
|
133 |
+ |
finally { |
167 |
134 |
|
dispose( destinationChannel ); |
168 |
135 |
|
} |
169 |
136 |
|
} |
170 |
|
- |
finally |
171 |
|
- |
{ |
|
137 |
+ |
finally { |
172 |
138 |
|
dispose( sourceChannel ); |
173 |
139 |
|
} |
174 |
140 |
|
} |
|
@@ -176,8 +142,7 @@ |
176 |
142 |
|
/** |
177 |
143 |
|
* Copies a file, overwriting any existing file at the destination. |
178 |
144 |
|
*/ |
179 |
|
- |
public static String copyFile( String in, String out ) |
180 |
|
- |
{ |
|
145 |
+ |
public static String copyFile( String in, String out ) { |
181 |
146 |
|
copyFile( new File( assertNotEmpty( "in", in ) ), new File( out = assertNotEmpty( "out", out ) ) ); |
182 |
147 |
|
return out; |
183 |
148 |
|
} |
|
@@ -185,8 +150,7 @@ |
185 |
150 |
|
/** |
186 |
151 |
|
* Moves a file, overwriting any existing file at the destination. |
187 |
152 |
|
*/ |
188 |
|
- |
static public String moveFile( String in, String out ) |
189 |
|
- |
{ |
|
153 |
+ |
static public String moveFile( String in, String out ) { |
190 |
154 |
|
copyFile( in = assertNotEmpty( "in", in ), out ); |
191 |
155 |
|
delete( in ); |
192 |
156 |
|
return out; |
|
@@ -195,32 +159,26 @@ |
195 |
159 |
|
/** |
196 |
160 |
|
* Returns the textual contents of the specified file. |
197 |
161 |
|
*/ |
198 |
|
- |
static public String fileContents( String path ) |
199 |
|
- |
{ |
|
162 |
+ |
static public String fileContents( String path ) { |
200 |
163 |
|
return fileContents( new File( path ) ); |
201 |
164 |
|
} |
202 |
165 |
|
|
203 |
166 |
|
/** |
204 |
167 |
|
* Returns the textual contents of the specified file. |
205 |
168 |
|
*/ |
206 |
|
- |
static public String fileContents( File pFile ) |
207 |
|
- |
{ |
|
169 |
+ |
static public String fileContents( File pFile ) { |
208 |
170 |
|
StringBuilder stringBuffer = new StringBuilder( 4096 ); |
209 |
171 |
|
FileReader reader = createFileReader( pFile ); |
210 |
|
- |
try |
211 |
|
- |
{ |
|
172 |
+ |
try { |
212 |
173 |
|
char[] buffer = new char[2048]; |
213 |
|
- |
for ( int length; -1 != (length = reader.read( buffer )); ) |
214 |
|
- |
{ |
|
174 |
+ |
for ( int length; -1 != (length = reader.read( buffer )); ) { |
215 |
175 |
|
stringBuffer.append( buffer, 0, length ); |
216 |
176 |
|
} |
217 |
177 |
|
} |
218 |
|
- |
catch ( IOException e ) |
219 |
|
- |
{ |
|
178 |
+ |
catch ( IOException e ) { |
220 |
179 |
|
throw new WrappedIOException( e ); |
221 |
180 |
|
} |
222 |
|
- |
finally |
223 |
|
- |
{ |
|
181 |
+ |
finally { |
224 |
182 |
|
dispose( reader ); |
225 |
183 |
|
} |
226 |
184 |
|
return stringBuffer.toString(); |
|
@@ -229,81 +187,63 @@ |
229 |
187 |
|
/** |
230 |
188 |
|
* Update the File Contents. |
231 |
189 |
|
*/ |
232 |
|
- |
static public void updateFileContents( File pFile, String pNewContents ) |
233 |
|
- |
{ |
|
190 |
+ |
static public void updateFileContents( File pFile, String pNewContents ) { |
234 |
191 |
|
FileWriter writer = createFileWriter( pFile ); |
235 |
|
- |
try |
236 |
|
- |
{ |
|
192 |
+ |
try { |
237 |
193 |
|
writer.write( pNewContents ); |
238 |
194 |
|
Closeable zCloseable = writer; |
239 |
195 |
|
writer = null; |
240 |
196 |
|
close( zCloseable ); |
241 |
197 |
|
} |
242 |
|
- |
catch ( IOException e ) |
243 |
|
- |
{ |
|
198 |
+ |
catch ( IOException e ) { |
244 |
199 |
|
throw new WrappedIOException( e ); |
245 |
200 |
|
} |
246 |
|
- |
finally |
247 |
|
- |
{ |
|
201 |
+ |
finally { |
248 |
202 |
|
dispose( writer ); |
249 |
203 |
|
} |
250 |
204 |
|
} |
251 |
205 |
|
|
252 |
|
- |
public static BufferedOutputStream createBufferedFileOutputStream( String filePath ) |
253 |
|
- |
{ |
|
206 |
+ |
public static BufferedOutputStream createBufferedFileOutputStream( String filePath ) { |
254 |
207 |
|
return createBufferedFileOutputStream( new File( filePath ) ); |
255 |
208 |
|
} |
256 |
209 |
|
|
257 |
|
- |
public static BufferedOutputStream createBufferedFileOutputStream( File out ) |
258 |
|
- |
{ |
|
210 |
+ |
public static BufferedOutputStream createBufferedFileOutputStream( File out ) { |
259 |
211 |
|
return new BufferedOutputStream( createFileOutputStream( out ) ); |
260 |
212 |
|
} |
261 |
213 |
|
|
262 |
|
- |
public static FileOutputStream createFileOutputStream( File out ) |
263 |
|
- |
{ |
|
214 |
+ |
public static FileOutputStream createFileOutputStream( File out ) { |
264 |
215 |
|
mkdir( out.getParentFile() ); |
265 |
|
- |
try |
266 |
|
- |
{ |
|
216 |
+ |
try { |
267 |
217 |
|
return new FileOutputStream( out ); |
268 |
218 |
|
} |
269 |
|
- |
catch ( FileNotFoundException e ) |
270 |
|
- |
{ |
|
219 |
+ |
catch ( FileNotFoundException e ) { |
271 |
220 |
|
throw new WrappedIOException( e ); |
272 |
221 |
|
} |
273 |
222 |
|
} |
274 |
223 |
|
|
275 |
|
- |
public static FileInputStream createFileInputStream( File in ) |
276 |
|
- |
{ |
277 |
|
- |
try |
278 |
|
- |
{ |
|
224 |
+ |
public static FileInputStream createFileInputStream( File in ) { |
|
225 |
+ |
try { |
279 |
226 |
|
return new FileInputStream( in ); |
280 |
227 |
|
} |
281 |
|
- |
catch ( FileNotFoundException e ) |
282 |
|
- |
{ |
|
228 |
+ |
catch ( FileNotFoundException e ) { |
283 |
229 |
|
throw new WrappedIOException( e ); |
284 |
230 |
|
} |
285 |
231 |
|
} |
286 |
232 |
|
|
287 |
|
- |
public static FileReader createFileReader( File in ) |
288 |
|
- |
{ |
289 |
|
- |
try |
290 |
|
- |
{ |
|
233 |
+ |
public static FileReader createFileReader( File in ) { |
|
234 |
+ |
try { |
291 |
235 |
|
return new FileReader( in ); |
292 |
236 |
|
} |
293 |
|
- |
catch ( FileNotFoundException e ) |
294 |
|
- |
{ |
|
237 |
+ |
catch ( FileNotFoundException e ) { |
295 |
238 |
|
throw new WrappedIOException( e ); |
296 |
239 |
|
} |
297 |
240 |
|
} |
298 |
241 |
|
|
299 |
|
- |
public static FileWriter createFileWriter( File out ) |
300 |
|
- |
{ |
301 |
|
- |
try |
302 |
|
- |
{ |
|
242 |
+ |
public static FileWriter createFileWriter( File out ) { |
|
243 |
+ |
try { |
303 |
244 |
|
return new FileWriter( out ); |
304 |
245 |
|
} |
305 |
|
- |
catch ( IOException e ) |
306 |
|
- |
{ |
|
246 |
+ |
catch ( IOException e ) { |
307 |
247 |
|
throw new WrappedIOException( e ); |
308 |
248 |
|
} |
309 |
249 |
|
} |
|
@@ -311,11 +251,9 @@ |
311 |
251 |
|
/** |
312 |
252 |
|
* Creates the directories in the specified path. |
313 |
253 |
|
*/ |
314 |
|
- |
public static File mkdir( File path ) |
315 |
|
- |
{ |
|
254 |
+ |
public static File mkdir( File path ) { |
316 |
255 |
|
assertNotNull( "path", path ); |
317 |
|
- |
if ( path.mkdirs() ) |
318 |
|
- |
{ |
|
256 |
+ |
if ( path.mkdirs() ) { |
319 |
257 |
|
LOGGER.trace.log( "Created directory: ", path.getPath() ); |
320 |
258 |
|
} |
321 |
259 |
|
return path; |
|
@@ -324,8 +262,7 @@ |
324 |
262 |
|
/** |
325 |
263 |
|
* Creates the directories in the specified path. |
326 |
264 |
|
*/ |
327 |
|
- |
public static String mkdir( String path ) |
328 |
|
- |
{ |
|
265 |
+ |
public static String mkdir( String path ) { |
329 |
266 |
|
mkdir( new File( path = assertNotEmpty( "path", path ) ) ); |
330 |
267 |
|
return path; |
331 |
268 |
|
} |
|
@@ -333,16 +270,12 @@ |
333 |
270 |
|
/** |
334 |
271 |
|
* Deletes a directory and all files and directories it contains. |
335 |
272 |
|
*/ |
336 |
|
- |
public static boolean delete( File pFile ) |
337 |
|
- |
{ |
|
273 |
+ |
public static boolean delete( File pFile ) { |
338 |
274 |
|
assertNotNull( "File", pFile ); |
339 |
|
- |
if ( pFile.isDirectory() ) |
340 |
|
- |
{ |
|
275 |
+ |
if ( pFile.isDirectory() ) { |
341 |
276 |
|
File[] zFiles = pFile.listFiles(); |
342 |
|
- |
for ( File zFile : zFiles ) |
343 |
|
- |
{ |
344 |
|
- |
if ( !delete( zFile ) ) |
345 |
|
- |
{ |
|
277 |
+ |
for ( File zFile : zFiles ) { |
|
278 |
+ |
if ( !delete( zFile ) ) { |
346 |
279 |
|
return false; |
347 |
280 |
|
} |
348 |
281 |
|
} |
|
@@ -354,22 +287,17 @@ |
354 |
287 |
|
/** |
355 |
288 |
|
* Deletes a file or directory and all files and subdirecties under it. |
356 |
289 |
|
*/ |
357 |
|
- |
public static boolean delete( String fileName ) |
358 |
|
- |
{ |
|
290 |
+ |
public static boolean delete( String fileName ) { |
359 |
291 |
|
fileName = noEmpty( fileName ); |
360 |
292 |
|
return (fileName != null) && delete( new File( fileName ) ); |
361 |
293 |
|
} |
362 |
294 |
|
|
363 |
|
- |
public static Closeable dispose( Closeable pCloseable ) |
364 |
|
- |
{ |
365 |
|
- |
if ( pCloseable != null ) |
366 |
|
- |
{ |
367 |
|
- |
try |
368 |
|
- |
{ |
|
295 |
+ |
public static Closeable dispose( Closeable pCloseable ) { |
|
296 |
+ |
if ( pCloseable != null ) { |
|
297 |
+ |
try { |
369 |
298 |
|
pCloseable.close(); |
370 |
299 |
|
} |
371 |
|
- |
catch ( IOException ignore ) |
372 |
|
- |
{ |
|
300 |
+ |
catch ( IOException ignore ) { |
373 |
301 |
|
// Whatever! |
374 |
302 |
|
} |
375 |
303 |
|
pCloseable = null; |
|
@@ -377,57 +305,45 @@ |
377 |
305 |
|
return pCloseable; |
378 |
306 |
|
} |
379 |
307 |
|
|
380 |
|
- |
public static void close( Closeable pCloseable ) |
381 |
|
- |
{ |
382 |
|
- |
if ( pCloseable != null ) |
383 |
|
- |
{ |
384 |
|
- |
try |
385 |
|
- |
{ |
|
308 |
+ |
public static void close( Closeable pCloseable ) { |
|
309 |
+ |
if ( pCloseable != null ) { |
|
310 |
+ |
try { |
386 |
311 |
|
pCloseable.close(); |
387 |
312 |
|
} |
388 |
|
- |
catch ( IOException e ) |
389 |
|
- |
{ |
|
313 |
+ |
catch ( IOException e ) { |
390 |
314 |
|
throw new WrappedIOException( e ); |
391 |
315 |
|
} |
392 |
316 |
|
} |
393 |
317 |
|
} |
394 |
318 |
|
|
395 |
|
- |
public static String getCanonicalPath( File pFile ) |
396 |
|
- |
{ |
|
319 |
+ |
public static String getCanonicalPath( File pFile ) { |
397 |
320 |
|
return getCanonicalFile( pFile ).getPath(); |
398 |
321 |
|
} |
399 |
322 |
|
|
400 |
|
- |
public static File getCanonicalFile( File pFile ) |
401 |
|
- |
{ |
402 |
|
- |
try |
403 |
|
- |
{ |
|
323 |
+ |
public static File getCanonicalFile( File pFile ) { |
|
324 |
+ |
try { |
404 |
325 |
|
return pFile.getCanonicalFile(); |
405 |
326 |
|
} |
406 |
|
- |
catch ( IOException e ) |
407 |
|
- |
{ |
|
327 |
+ |
catch ( IOException e ) { |
408 |
328 |
|
throw new WrappedIOException( e ); |
409 |
329 |
|
} |
410 |
330 |
|
} |
411 |
331 |
|
|
412 |
|
- |
public static boolean isAbsolutePath( String path ) |
413 |
|
- |
{ |
|
332 |
+ |
public static boolean isAbsolutePath( String path ) { |
414 |
333 |
|
assertNotNull( "path", path ); |
415 |
334 |
|
return FileSupport.isAbsoluteNormalizedPath( FILE_SYSTEM, CANONICAL_USER_DIR.getPath(), FileSupport.normalizePath( FILE_SYSTEM, path ) ); |
416 |
335 |
|
} |
417 |
336 |
|
|
418 |
|
- |
public static String normalizePath( String path ) |
419 |
|
- |
{ |
|
337 |
+ |
public static String normalizePath( String path ) { |
420 |
338 |
|
assertNotNull( "path", path ); |
421 |
339 |
|
return FileSupport.normalizePath( FILE_SYSTEM, path ); |
422 |
340 |
|
} |
423 |
341 |
|
|
424 |
|
- |
public static File canonicalizePath( String path ) |
425 |
|
- |
{ |
|
342 |
+ |
public static File canonicalizePath( String path ) { |
426 |
343 |
|
return canonicalizePath( CANONICAL_USER_DIR, path ); |
427 |
344 |
|
} |
428 |
345 |
|
|
429 |
|
- |
public static File canonicalizePath( File pCanonicalParentDirIfPathRelative, String path ) |
430 |
|
- |
{ |
|
346 |
+ |
public static File canonicalizePath( File pCanonicalParentDirIfPathRelative, String path ) { |
431 |
347 |
|
assertNotNull( "path", path ); |
432 |
348 |
|
return new File( FileSupport.canonicalizeNormalizedPath( FILE_SYSTEM, pCanonicalParentDirIfPathRelative.getPath(), FileSupport.normalizePath( FILE_SYSTEM, path ) ) ); |
433 |
349 |
|
} |