org.topbraid.core.io
Class Files

java.lang.Object
  extended by org.topbraid.core.io.Files

public class Files
extends java.lang.Object


Constructor Summary
Files()
           
 
Method Summary
static org.eclipse.core.resources.IFile createFile(org.eclipse.core.resources.IFile file, boolean readOnly, java.io.InputStream is, org.eclipse.core.runtime.IProgressMonitor monitor)
          Create a new IFile.
static org.eclipse.core.resources.IFile createFile(java.lang.String filePath, boolean enumerate, boolean readOnly, java.io.InputStream is, org.eclipse.core.runtime.IProgressMonitor monitor)
          Creates an IFile from the given path and input stream.
static java.lang.String getFileExtension(java.lang.String filePath)
           
static java.lang.String getFileNoExtension(java.lang.String filePath)
           
static org.eclipse.core.runtime.IPath getFilePathByBaseURIPath(java.net.URI baseURI, java.lang.String fileName)
           
static java.lang.String getFilePathWithEnumerator(java.lang.String filePath, int enumerator)
           
static boolean isLinked(org.eclipse.core.resources.IResource resource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Files

public Files()
Method Detail

createFile

public static org.eclipse.core.resources.IFile createFile(org.eclipse.core.resources.IFile file,
                                                          boolean readOnly,
                                                          java.io.InputStream is,
                                                          org.eclipse.core.runtime.IProgressMonitor monitor)
                                                   throws java.lang.Exception
Create a new IFile. It would issue an exception if the file already exists.

Parameters:
file -
readOnly -
is -
monitor -
Returns:
IFile
Throws:
java.lang.Exception

createFile

public static org.eclipse.core.resources.IFile createFile(java.lang.String filePath,
                                                          boolean enumerate,
                                                          boolean readOnly,
                                                          java.io.InputStream is,
                                                          org.eclipse.core.runtime.IProgressMonitor monitor)
                                                   throws java.lang.Exception
Creates an IFile from the given path and input stream. If the file already exists at the given path, then if allowed, the file is created at an enumerated path.

Parameters:
filePath -
is -
monitor -
Returns:
IFile
Throws:
java.lang.Exception

getFileExtension

public static java.lang.String getFileExtension(java.lang.String filePath)

getFileNoExtension

public static java.lang.String getFileNoExtension(java.lang.String filePath)

getFilePathByBaseURIPath

public static org.eclipse.core.runtime.IPath getFilePathByBaseURIPath(java.net.URI baseURI,
                                                                      java.lang.String fileName)

getFilePathWithEnumerator

public static java.lang.String getFilePathWithEnumerator(java.lang.String filePath,
                                                         int enumerator)

isLinked

public static boolean isLinked(org.eclipse.core.resources.IResource resource)