Class FileInitializer

    • Field Detail

      • _scheme

        protected final Set<String> _scheme
      • _basehome

        protected final BaseHome _basehome
    • Constructor Detail

      • FileInitializer

        protected FileInitializer​(BaseHome basehome,
                                  String... scheme)
    • Method Detail

      • isApplicable

        public boolean isApplicable​(URI uri)
      • create

        public abstract boolean create​(URI uri,
                                       String location)
                                throws IOException
        Initialize a file resource
        Parameters:
        uri - the URI of the resource acting as its source
        location - the simple string reference to the output file, suitable for searching for the file in other locations (like ${jetty.home} or ${jetty.dir}) *
        Returns:
        true if local file system is modified.
        Throws:
        IOException - if there was an attempt to initialize, but an error occurred.
      • isFilePresent

        protected boolean isFilePresent​(Path... paths)
                                 throws IOException
        Test if any of the Paths exist (as files)
        Parameters:
        paths - the list of paths to check
        Returns:
        true if the path exist (as a file), false if it doesn't exist
        Throws:
        IOException - if the path points to a non-file, or is not readable.