Subversion Repository Public Repository

litesoft

Diff Revisions 803 vs 804 for /trunk/Java/core/Server/src/org/litesoft/util/FileUtils.java

Diff revisions: vs.
  @@ -47,7 +47,7 @@
47 47 public static void deleteIfExists( File pFile )
48 48 throws FileSystemException
49 49 {
50 - Utils.assertNotNull( "File", pFile );
50 + Objects.assertNotNull( "File", pFile );
51 51 if ( pFile.isFile() )
52 52 {
53 53 if ( !pFile.delete() || pFile.exists() )
  @@ -99,7 +99,7 @@
99 99 public static byte[] load( File pFile, int pMaxAllowedSize )
100 100 throws FileSystemException
101 101 {
102 - Utils.assertNotNull( "File", pFile );
102 + Objects.assertNotNull( "File", pFile );
103 103 try
104 104 {
105 105 if ( !pFile.exists() )
  @@ -152,7 +152,7 @@
152 152 public static void appendTextFile( File pFile, String... pLines )
153 153 throws FileSystemException
154 154 {
155 - Utils.assertNotNull( "File", pFile );
155 + Objects.assertNotNull( "File", pFile );
156 156 File file = new File( pFile.getAbsolutePath() );
157 157 addLines( file, true, pLines );
158 158 }
  @@ -160,7 +160,7 @@
160 160 public static void store( File pFile, byte[] pBytes )
161 161 throws FileSystemException
162 162 {
163 - Utils.assertNotNull( "File", pFile );
163 + Objects.assertNotNull( "File", pFile );
164 164 File file = DirectoryUtils.insureParentDirectory( new File( pFile.getAbsolutePath() + ".new" ) );
165 165 try
166 166 {
  @@ -193,7 +193,7 @@
193 193 public static void storeTextFile( File pFile, String... pLines )
194 194 throws FileSystemException
195 195 {
196 - Utils.assertNotNull( "File", pFile );
196 + Objects.assertNotNull( "File", pFile );
197 197 File file = new File( pFile.getAbsolutePath() + ".new" );
198 198 addLines( file, false, pLines );
199 199 rollIn( file, pFile, new File( pFile.getAbsolutePath() + ".bak" ) );
  @@ -241,7 +241,7 @@
241 241 public static String[] loadTextFile( File pFile )
242 242 throws FileSystemException
243 243 {
244 - Utils.assertNotNull( "File", pFile );
244 + Objects.assertNotNull( "File", pFile );
245 245 try
246 246 {
247 247 if ( !pFile.exists() )
  @@ -285,7 +285,7 @@
285 285 public static String loadTextFileAsString( File pFile, String pLineSeparator )
286 286 throws FileSystemException
287 287 {
288 - Utils.assertNotNull( "File", pFile );
288 + Objects.assertNotNull( "File", pFile );
289 289 pLineSeparator = Strings.deNull( pLineSeparator, "\n" );
290 290 try
291 291 {
  @@ -330,9 +330,9 @@
330 330 public static void rollIn( File pNewFile, File pTargetFile, File pBackupFile )
331 331 throws FileSystemException
332 332 {
333 - Utils.assertNotNull( "NewFile", pNewFile );
334 - Utils.assertNotNull( "TargetFile", pTargetFile );
335 - Utils.assertNotNull( "BackupFile", pBackupFile );
333 + Objects.assertNotNull( "NewFile", pNewFile );
334 + Objects.assertNotNull( "TargetFile", pTargetFile );
335 + Objects.assertNotNull( "BackupFile", pBackupFile );
336 336 if ( !pNewFile.exists() )
337 337 {
338 338 throw new FileSystemException( "Does not Exist: " + pNewFile.getPath() );
  @@ -393,8 +393,8 @@
393 393 private static void renameFromTo( File pSourceFile, File pDestinationFile )
394 394 throws FileSystemException
395 395 {
396 - Utils.assertNotNull( "SourceFile", pSourceFile );
397 - Utils.assertNotNull( "DestinationFile", pDestinationFile );
396 + Objects.assertNotNull( "SourceFile", pSourceFile );
397 + Objects.assertNotNull( "DestinationFile", pDestinationFile );
398 398 // Win 1 Start
399 399 if ( !pSourceFile.exists() )
400 400 {