|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.util.io.ConfluenceFileUtils
public class ConfluenceFileUtils
Utilities that patch/extend Atlassian Core FileUtils TODO migrate these out of confluence, into a common module
| Constructor Summary | |
|---|---|
ConfluenceFileUtils()
|
|
| Method Summary | |
|---|---|
static boolean |
isChildOf(File dir,
File child)
Determine if a file is a child of another |
static void |
moveDir(File srcDir,
File destDir)
move a directory with all it's children into another directory if destination directory already exists, it will be deleted. |
static void |
moveDirWithCopyFallback(File srcDir,
File destDir,
DeferredFileDeletionQueue deferredFileDeletionQueue)
Calls moveDir(java.io.File, java.io.File) to move the directory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConfluenceFileUtils()
| Method Detail |
|---|
public static void moveDir(File srcDir,
File destDir)
throws IOException
Retries a move once, after a short delay, if the move cannot complete for some reason. e.g. rename c:/foo/bar to c:/fooz/bar
IOException
public static void moveDirWithCopyFallback(File srcDir,
File destDir,
DeferredFileDeletionQueue deferredFileDeletionQueue)
throws IOException
moveDir(java.io.File, java.io.File) to move the directory. If that fails, it falls back to copying the source directory to
the destination directory.
srcDir - the directory to copydestDir - the location to copy to - it will be created if it does not existdeferredFileDeletionQueue -
IOException - when the move or copy operations fail.
public static boolean isChildOf(File dir,
File child)
dir - the directory to checkchild - the child to find
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||