Class IFileUtils

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

public class IFileUtils extends Object
  • 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

      public static String getPathWithoutProject(String path)
    • 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