|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--au.com.prunge.jgenfile.impl.local.ItemUtils
Class containing utility methods for local file systems and items.
Method Summary | |
static LocalDirectory |
createDirectoryFromFile(au.com.prunge.jgenfile.FileSystem fileSystem,
File file)
Attempts to create a directory from the specified file. |
static LocalDirectory |
createDirectoryFromFile(au.com.prunge.jgenfile.FileSystem fileSystem,
File file,
boolean isRoot)
Attempts to create a directory from the specified file. |
static LocalFile |
createFileFromFile(au.com.prunge.jgenfile.FileSystem fileSystem,
File file)
Attempts to create a file from the specified java.io.File object. |
static LocalItem |
createItemFromFile(au.com.prunge.jgenfile.FileSystem fileSystem,
File file)
Creates an item from a file object. |
static LocalItem |
createItemFromFile(au.com.prunge.jgenfile.FileSystem fileSystem,
File file,
boolean isRoot)
Creates an item from a file object. |
static au.com.prunge.jgenfile.RelativeItemReference |
createRelativeReferenceFromFile(File file,
File topParent)
Creates a relative item reference for the specified file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static LocalItem createItemFromFile(au.com.prunge.jgenfile.FileSystem fileSystem, File file, boolean isRoot) throws ItemNotFoundException, JGenFileException
fileSystem
- the file system the item will
exist in.file
- the file to create the item from.isRoot
- true if the item is a root, false if not.
NullPointerException
- if file
== null.
ItemNotFoundException
- if the specified File does not exist
in the local file system.
JGenFileException
- if another error occurs.public static LocalItem createItemFromFile(au.com.prunge.jgenfile.FileSystem fileSystem, File file) throws ItemNotFoundException, JGenFileException
fileSystem
- the file system the item will
exist in.file
- the file to create the item from.
NullPointerException
- if file
== null.
ItemNotFoundException
- if the specified File does not exist
in the local file system.
JGenFileException
- if another error occurs.public static LocalDirectory createDirectoryFromFile(au.com.prunge.jgenfile.FileSystem fileSystem, File file) throws ItemNotFoundException, JGenFileException
fileSystem
- the file system the directory exists in.file
- the file object to create the directory object from.
ItemNotFoundException
- if the specified file does not exist.
JGenFileException
- if the specified file does not
point to a directory, or another
error occurs.public static LocalDirectory createDirectoryFromFile(au.com.prunge.jgenfile.FileSystem fileSystem, File file, boolean isRoot) throws ItemNotFoundException, JGenFileException
fileSystem
- the file system the directory exists in.file
- the file object to create the directory object from.isRoot
- true if the item is a root, false if not.
ItemNotFoundException
- if the specified file does not exist.
JGenFileException
- if the specified file does not
point to a directory, or another
error occurs.public static LocalFile createFileFromFile(au.com.prunge.jgenfile.FileSystem fileSystem, File file) throws ItemNotFoundException, JGenFileException
fileSystem
- the file system the file exists in.file
- the java.io.File object to create the file object from.
ItemNotFoundException
- if the specified file does not exist.
JGenFileException
- if the specified file object does not
point to a file, or another
error occurs.public static au.com.prunge.jgenfile.RelativeItemReference createRelativeReferenceFromFile(File file, File topParent) throws NullPointerException, JGenFileException
file
- the file to create the reference for.topParent
- the highest parent in the relative
reference.
NullPointerException
- if a parameter is null.
JGenFileException
- if topParent
is not
an ancestor of file
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |