org.dawb.common.util.io
Class IFileUtils

java.lang.Object
  extended by org.dawb.common.util.io.IFileUtils

public class IFileUtils
extends java.lang.Object


Constructor Summary
IFileUtils()
           
 
Method Summary
static org.eclipse.core.resources.IContainer getContainer(java.lang.String path, java.lang.String projectDefault, java.lang.String containerDefault)
          Attempts to find or create a new folder at the given path
static java.lang.String getPathWithoutProject(java.lang.String path)
           
static org.eclipse.core.resources.IFile getUniqueIFile(org.eclipse.core.resources.IContainer cont, java.lang.String rootName, java.lang.String ext)
           
static org.eclipse.core.resources.IFile getUniqueIFile(org.eclipse.core.resources.IFolder edna, java.lang.String rootName, java.lang.String ext)
          Simply gets a unqiue file in the folder.
static org.eclipse.core.resources.IFile getUniqueIFile(org.eclipse.core.resources.IProject edna, java.lang.String rootName, java.lang.String ext)
          Simply gets a unqiue file in the folder.
static void setReadOnly(org.eclipse.core.resources.IContainer parent, boolean isReadOnly)
          Recursively change
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IFileUtils

public IFileUtils()
Method Detail

setReadOnly

public static void setReadOnly(org.eclipse.core.resources.IContainer parent,
                               boolean isReadOnly)
                        throws org.eclipse.core.runtime.CoreException
Recursively change

Parameters:
parent -
isReadOnly -
Throws:
org.eclipse.core.runtime.CoreException

getUniqueIFile

public static org.eclipse.core.resources.IFile getUniqueIFile(org.eclipse.core.resources.IContainer cont,
                                                              java.lang.String rootName,
                                                              java.lang.String ext)
Parameters:
cont -
rootName -
ext - - without the "." in front
Returns:

getUniqueIFile

public static org.eclipse.core.resources.IFile getUniqueIFile(org.eclipse.core.resources.IFolder edna,
                                                              java.lang.String rootName,
                                                              java.lang.String ext)
Simply gets a unqiue file in the folder.

Parameters:
edna -
rootName -
ext -
Returns:

getUniqueIFile

public static org.eclipse.core.resources.IFile getUniqueIFile(org.eclipse.core.resources.IProject edna,
                                                              java.lang.String rootName,
                                                              java.lang.String ext)
Simply gets a unqiue file in the folder.

Parameters:
edna -
rootName -
ext -
Returns:

getPathWithoutProject

public static java.lang.String getPathWithoutProject(java.lang.String path)

getContainer

public static org.eclipse.core.resources.IContainer getContainer(java.lang.String path,
                                                                 java.lang.String projectDefault,
                                                                 java.lang.String containerDefault)
                                                          throws java.lang.Exception
Attempts to find or create a new folder at the given path

Parameters:
path -
Returns:
Throws:
java.lang.Exception