Subversion Repository Public Repository

litesoft

Diff Revisions 72 vs 76 for /trunk/Java/core/Server/src/org/litesoft/util/FileUtil.java

Diff revisions: vs.
  @@ -15,12 +15,7 @@
15 15 throws IOException
16 16 {
17 17 Utils.assertNotNull( "File", pFile );
18 - File zParentFile = pFile.getParentFile();
19 - if ( zParentFile != null )
20 - {
21 - DirectoryUtils.insureDirectory( zParentFile );
22 - }
23 - return new BufferedWriter( new OutputStreamWriter( new FileOutputStream( pFile, pAppend ), UTF_8 ) );
18 + return new BufferedWriter( new OutputStreamWriter( new FileOutputStream( DirectoryUtils.insureParentDirectory( pFile ), pAppend ), UTF_8 ) );
24 19 }
25 20
26 21 public static BufferedReader createReader( File pFile )