Class SpoonResourceHelper


  • public abstract class SpoonResourceHelper
    extends java.lang.Object
    This class defines a helper for manipulating resources.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static SpoonFile createFile​(java.io.File f)
      Creates the SpoonFile corresponding to the given file.
      static SpoonFolder createFolder​(java.io.File f)
      Creates the SpoonFolder corresponding to the given file.
      static SpoonResource createResource​(java.io.File f)
      Creates the SpoonResource corresponding to the given file.
      static boolean isArchive​(java.io.File f)
      Tells if the given file is an archive file.
      static boolean isFile​(java.io.File f)
      Tells if the given file is file (files are not archives).
      static java.util.List<SpoonResource> resources​(java.lang.String... paths)
      Creates the list of SpoonResource corresponding to the given paths (files, folders, archives).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isArchive

        public static boolean isArchive​(java.io.File f)
        Tells if the given file is an archive file.
      • isFile

        public static boolean isFile​(java.io.File f)
        Tells if the given file is file (files are not archives).
      • resources

        public static java.util.List<SpoonResource> resources​(java.lang.String... paths)
                                                       throws java.io.FileNotFoundException
        Creates the list of SpoonResource corresponding to the given paths (files, folders, archives).
        Throws:
        java.io.FileNotFoundException
      • createFile

        public static SpoonFile createFile​(java.io.File f)
                                    throws java.io.FileNotFoundException
        Creates the SpoonFile corresponding to the given file.
        Throws:
        java.io.FileNotFoundException
      • createResource

        public static SpoonResource createResource​(java.io.File f)
                                            throws java.io.FileNotFoundException
        Creates the SpoonResource corresponding to the given file.
        Throws:
        java.io.FileNotFoundException
      • createFolder

        public static SpoonFolder createFolder​(java.io.File f)
                                        throws java.io.FileNotFoundException
        Creates the SpoonFolder corresponding to the given file.
        Throws:
        java.io.FileNotFoundException