Interface Directory

    • Method Detail

      • getAsFile

        java.io.File getAsFile()
        Returns the location of this directory, as an absolute File.
        Specified by:
        getAsFile in interface FileSystemLocation
        Returns:
        the File
        Since:
        4.2
      • getAsFileTree

        FileTree getAsFileTree()
        Returns a FileTree that allows the files and directories contained in this directory to be queried.
      • dir

        Directory dir​(java.lang.String path)
        Returns a Directory whose location is the given path, resolved relative to this directory.
        Parameters:
        path - The path. Can be absolute.
        Returns:
        The directory.
      • dir

        Provider<Directory> dir​(Provider<? extends java.lang.CharSequence> path)
        Returns a Provider whose value is a Directory whose location is the given path resolved relative to this directory.

        The return value is live and the provided path is queried each time the return value is queried.

        Parameters:
        path - The path provider. Can have value that is an absolute path.
        Returns:
        The provider.
      • file

        RegularFile file​(java.lang.String path)
        Returns a RegularFile whose location is the given path, resolved relative to this directory.
        Parameters:
        path - The path. Can be absolute.
        Returns:
        The file.
      • file

        Provider<RegularFile> file​(Provider<? extends java.lang.CharSequence> path)
        Returns a Provider whose value is a RegularFile whose location is the given path resolved relative to this directory.

        The return value is live and the provided path is queried each time the return value is queried.

        Parameters:
        path - The path provider. Can have value that is an absolute path.
        Returns:
        The file.
      • files

        FileCollection files​(java.lang.Object... paths)
        Returns a FileCollection containing the given files, whose locations are the given paths resolved relative to this directory, as defined by Project.files(Object...). This method can also be used to create an empty collection, but the collection may not be mutated later.
        Parameters:
        paths - The paths to the files. May be empty.
        Returns:
        The file collection.
        Since:
        6.0