|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.internal.utils.FileUtil
public class FileUtil
Static utility methods for manipulating Files and URIs.
Method Summary | |
---|---|
static org.eclipse.core.filesystem.IFileInfo |
attributesToFileInfo(ResourceAttributes attributes)
Converts a ResourceAttributes object into an IFileInfo object. |
static org.eclipse.core.runtime.IPath |
canonicalPath(org.eclipse.core.runtime.IPath path)
Converts an IPath into its canonical form for the local file system. |
static java.net.URI |
canonicalURI(java.net.URI uri)
Converts a URI into its canonical form. |
static ResourceAttributes |
fileInfoToAttributes(org.eclipse.core.filesystem.IFileInfo fileInfo)
Converts an IFileInfo object into a ResourceAttributes object. |
static boolean |
isOverlapping(java.net.URI location1,
java.net.URI location2)
Returns true if the given file system locations overlap, and false otherwise. |
static boolean |
isPrefixOf(org.eclipse.core.runtime.IPath location1,
org.eclipse.core.runtime.IPath location2)
Returns true if location1 is the same as, or a proper prefix of, location2. |
static boolean |
isPrefixOf(java.net.URI location1,
java.net.URI location2)
Returns true if location1 is the same as, or a proper prefix of, location2. |
static void |
safeClose(java.io.InputStream in)
Closes a stream and ignores any resulting exception. |
static void |
safeClose(java.io.OutputStream out)
Closes a stream and ignores any resulting exception. |
static org.eclipse.core.runtime.IPath |
toPath(java.net.URI uri)
Converts a URI to an IPath. |
static void |
transferStreams(java.io.InputStream source,
java.io.OutputStream destination,
java.lang.String path,
org.eclipse.core.runtime.IProgressMonitor monitor)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static org.eclipse.core.filesystem.IFileInfo attributesToFileInfo(ResourceAttributes attributes)
attributes
- The resource attributes
public static org.eclipse.core.runtime.IPath canonicalPath(org.eclipse.core.runtime.IPath path)
public static java.net.URI canonicalURI(java.net.URI uri)
public static ResourceAttributes fileInfoToAttributes(org.eclipse.core.filesystem.IFileInfo fileInfo)
fileInfo
- The file info
public static boolean isOverlapping(java.net.URI location1, java.net.URI location2)
public static boolean isPrefixOf(org.eclipse.core.runtime.IPath location1, org.eclipse.core.runtime.IPath location2)
public static boolean isPrefixOf(java.net.URI location1, java.net.URI location2)
public static void safeClose(java.io.InputStream in)
public static void safeClose(java.io.OutputStream out)
public static org.eclipse.core.runtime.IPath toPath(java.net.URI uri)
Note this method differs from URIUtil in its handling of relative URIs as being relative to path variables.
public static final void transferStreams(java.io.InputStream source, java.io.OutputStream destination, java.lang.String path, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |