Package org.eclipse.ecf.filetransfer
Interface IRemoteFileInfo
public interface IRemoteFileInfo
Information about a remote file. Last modified day/time, length in bytes,
whether the remote file is a directory, a name, and file attributes.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionGet remote file attributes.long
Returns the last modified time for this file, orNO_LAST_MODIFIED
if the file does not exist or the last modified time could not be computed.long
Returns the length of this file, orNO_LENGTH
if the file does not exist, is a directory, or the length could not be computed.getName()
Returns the name of this file.boolean
Returns whether this file is a directory, orfalse
if this file does not exist.void
setAttributes
(IRemoteFileAttributes attributes) Set the attributes for this remote file info.void
setLastModified
(long time) Set the last modified time for this remote file info.void
Set the underlying name for this remote file info.
-
Field Details
-
NO_LENGTH
static final int NO_LENGTH- See Also:
-
NONE
static final int NONEDeprecated.- See Also:
-
NO_LAST_MODIFIED
static final int NO_LAST_MODIFIED- See Also:
-
-
Method Details
-
getLastModified
long getLastModified()Returns the last modified time for this file, orNO_LAST_MODIFIED
if the file does not exist or the last modified time could not be computed.The time is represented as the number of Universal Time (UT) milliseconds since the epoch (00:00:00 GMT, January 1, 1970).
- Returns:
- the last modified time for this file, or
NO_LAST_MODIFIED
if file does not exist or last modified not known or could not be computed.
-
getLength
long getLength()Returns the length of this file, orNO_LENGTH
if the file does not exist, is a directory, or the length could not be computed.- Returns:
- the length of this file, or
NO_LENGTH
-
isDirectory
boolean isDirectory()Returns whether this file is a directory, orfalse
if this file does not exist.- Returns:
true
if this file is a directory, andfalse
otherwise.
-
getName
String getName()Returns the name of this file.- Returns:
- the name of this file. Will not return
null
.
-
getAttributes
IRemoteFileAttributes getAttributes()Get remote file attributes.- Returns:
- IRemoteFileAttributes for this IRemoteFile. Will not return
null
.
-
setAttributes
Set the attributes for this remote file info.- Parameters:
attributes
- the new attribute values to use.
-
setName
Set the underlying name for this remote file info.- Parameters:
name
- the new name to use. Must not benull
.
-
setLastModified
void setLastModified(long time) Set the last modified time for this remote file info.- Parameters:
time
- the time to use. SeegetLastModified()
for meaning of time value.
-