Package org.dawb.common.util.io
Class IFileUtils
java.lang.Object
org.dawb.common.util.io.IFileUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.eclipse.core.resources.IContainergetContainer(String path, String projectDefault, String containerDefault) Attempts to find or create a new folder at the given pathstatic StringgetPathWithoutProject(String path) static org.eclipse.core.resources.IFilegetUniqueIFile(org.eclipse.core.resources.IContainer cont, String rootName, String ext) static org.eclipse.core.resources.IFilegetUniqueIFile(org.eclipse.core.resources.IFolder edna, String rootName, String ext) Simply gets a unqiue file in the folder.static org.eclipse.core.resources.IFilegetUniqueIFile(org.eclipse.core.resources.IProject edna, String rootName, String ext) Simply gets a unqiue file in the folder.static voidmkdirs(org.eclipse.core.resources.IFolder folder) Creates the specified IFolderstatic voidsetReadOnly(org.eclipse.core.resources.IContainer parent, boolean isReadOnly) Recursively change
-
Constructor Details
-
IFileUtils
public IFileUtils()
-
-
Method Details
-
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, String rootName, 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, String rootName, 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, String rootName, String ext) Simply gets a unqiue file in the folder.- Parameters:
edna-rootName-ext-- Returns:
-
getPathWithoutProject
-
getContainer
public static org.eclipse.core.resources.IContainer getContainer(String path, String projectDefault, String containerDefault) throws Exception Attempts to find or create a new folder at the given path- Parameters:
path-- Returns:
- Throws:
Exception
-
mkdirs
public static void mkdirs(org.eclipse.core.resources.IFolder folder) throws org.eclipse.core.runtime.CoreException Creates the specified IFolder- Parameters:
folder-- Throws:
org.eclipse.core.runtime.CoreException
-