fedora.server.journal.helpers
Class FileMovingUtil

java.lang.Object
  extended by fedora.server.journal.helpers.FileMovingUtil

public class FileMovingUtil
extends java.lang.Object

Title: FileMovingUtil.java

Description: Provides a workaround to the fact that java.io.File.renameTo(java.io.File) doesn't work across NFS file systems.

This code is taken from a workaround provided on the Sun Developer Network Bug Database (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4073756), by mailto:morgan.sziraki@cartesian.co.uk

Version:
$Id: FileMovingUtil.java 5999 2007-04-05 17:23:10Z cwilper $
Author:
jblake@cs.cornell.edu

Method Summary
static boolean move(java.io.File fromFile, java.io.File toFile)
          Move a File The renameTo method does not allow action across NFS mounted filesystems.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

move

public static final boolean move(java.io.File fromFile,
                                 java.io.File toFile)
Move a File The renameTo method does not allow action across NFS mounted filesystems. This method is the workaround.

Parameters:
fromFile - The existing File
toFile - The new File
Returns:
true if and only if the renaming succeeded; false otherwise