Interface ListDirectoryResult

  • All Superinterfaces:
    Serializable

    public interface ListDirectoryResult
    extends Serializable
    A single item that is the result of a ListDirectory.
    • Method Detail

      • getContext

        FileProviderContext getContext()
        Get the context for this result.
        Returns:
        the context of the result.
      • getDescription

        String getDescription​(com.redwood.scheduler.api.model.SchedulerSession session)
        Get the (translated) description for this result.
        Parameters:
        session - the session to translate the values
        Returns:
        the translated description
      • getName

        String getName()
        Get the base name of the file or directory that was found.
        Returns:
        the full path name of the item.
      • getPath

        String getPath()
        Get the path of the file or directory that was found. If the item is a symbolic link that refers to a different name, this will return the full path of the target of the link.
        Returns:
        the full path name of the item.
      • getIsDirectory

        boolean getIsDirectory()
        Is the path a directory?
        Returns:
        true if the path is a directory.
      • getHasSubDirectory

        boolean getHasSubDirectory()
        Does the path have sub-directories?
        Returns:
        true if the path has at least one sub-directory.
      • getSize

        long getSize()
        Size of the file or directory, in bytes.
        Returns:
        size of the file or directory.
      • getModificationTime

        DateTimeZone getModificationTime()
        Modification time of the item.
        Returns:
        Modification time.
      • getAccessTime

        DateTimeZone getAccessTime()
        Access time of the item.
        Returns:
        Access time.
      • getOwner

        String getOwner()
        String describing the item owner. The actual content is dependent on the underlying operating system. For example, if the originating server is a UNIX system this will contain 'owner group'.
        Returns:
        Owner.
      • getProtection

        String getProtection()
        String describing the item protection. The actual content is dependent on the underlying operating system. For example, if the originating server is a UNIX system this will contain a mode string, for example 'rwxrw-r--'.
        Returns:
        Protection.
      • getInputStream

        InputStream getInputStream​(com.redwood.scheduler.api.model.SchedulerSession session,
                                   int offset,
                                   int length)
        Get an input stream to the file contents.
        Parameters:
        session - the scheduler session
        offset - the offset to start at
        length - the length to read
        Returns:
        an input stream for the file
      • getInputStream

        InputStream getInputStream​(com.redwood.scheduler.api.model.SchedulerSession session,
                                   Logger log,
                                   RWIterable<ListDirectoryResult> results,
                                   int offset,
                                   int length)
        Get an input stream to the file contents.
        Parameters:
        session - the scheduler session
        log - the logger
        results - if this method is called to generate a file for the zip in the GetSupportFiles functionality, this parameter can be used to retrieve information about other ListDirectoryResult's that are included in the zip
        offset - the offset to start at
        length - the length to read
        Returns:
        an input stream for the file
      • getInputStream

        InputStream getInputStream​(com.redwood.scheduler.api.model.SchedulerSession session)
        Get an input stream to the file contents.
        Parameters:
        session - the scheduler session
        Returns:
        an input stream for the file
      • getInputStream

        InputStream getInputStream​(com.redwood.scheduler.api.model.SchedulerSession session,
                                   Logger log,
                                   RWIterable<ListDirectoryResult> results)
        Get an input stream to the file contents.
        Parameters:
        session - the scheduler session
        log - the logger
        results - if this method is called to generate a file for the zip in the GetSupportFiles functionality, this parameter can be used to retrieve information about other ListDirectoryResult's that are included in the zip
        Returns:
        an input stream for the file
      • cleanup

        default void cleanup()
        Cleans up any temporary data.