Interface ListDirectoryResult
-
- All Superinterfaces:
Serializable
public interface ListDirectoryResult extends Serializable
A single item that is the result of a ListDirectory.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
cleanup()
Cleans up any temporary data.DateTimeZone
getAccessTime()
Access time of the item.FileProviderContext
getContext()
Get the context for this result.String
getDescription(com.redwood.scheduler.api.model.SchedulerSession session)
Get the (translated) description for this result.boolean
getHasSubDirectory()
Does the path have sub-directories?InputStream
getInputStream(com.redwood.scheduler.api.model.SchedulerSession session)
Get an input stream to the file contents.InputStream
getInputStream(com.redwood.scheduler.api.model.SchedulerSession session, int offset, int length)
Get an input stream to the file contents.InputStream
getInputStream(com.redwood.scheduler.api.model.SchedulerSession session, Logger log, RWIterable<ListDirectoryResult> results)
Get an input stream to the file contents.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.boolean
getIsDirectory()
Is the path a directory?DateTimeZone
getModificationTime()
Modification time of the item.String
getName()
Get the base name of the file or directory that was found.String
getOwner()
String describing the item owner.String
getPath()
Get the path of the file or directory that was found.String
getProtection()
String describing the item protection.long
getSize()
Size of the file or directory, in bytes.
-
-
-
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 sessionoffset
- the offset to start atlength
- 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 sessionlog
- the loggerresults
- 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 zipoffset
- the offset to start atlength
- 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 sessionlog
- the loggerresults
- 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.
-
-