com.myjavaworld.ftp
Interface RemoteFile

All Known Implementing Classes:
DefaultRemoteFile

public interface RemoteFile

Objects of this class represent a file on the remote FTP server.

Version:
2.0
Author:
Sai Pullabhotla, psai [at] jMethods [dot] com

Method Summary
 String getAttributes()
          Returns the attributes of this file in standard unix format.
 String getExtension()
          Returns the extension of this file.
 String getGroup()
          Returns the group name to which the owner of this file belongs to.
 long getLastModified()
          Returns the last modified date of this file in milli seconds.
 int getLinkCount()
          Returns the number of links that point to this file.
 String getName()
          Returns the name of this remote file.
 String getNormalizedName()
          Returns the normalized name of this remote file.
 String getNormalizedPath()
          Returns the normalized path.
 Hashtable getOtherProperties()
          Returns additional properties of this file if any.
 String getOwner()
          Returns the owner of this file.
 String getPath()
          Returns the full path of this remote file.
 long getSize()
          Returns the size of this file in bytes.
 String getType()
          Returns the type of this file.
 boolean isDirectory()
          Tells whether this file is a directory or not.
 boolean isFile()
          Tells whether this file is a data file or not.
 boolean isLink()
          Checkes to see if this file is symbolic link.
 void setAttributes(String attributes)
          Sets the attributes on this file to the given attributes.
 

Method Detail

getName

String getName()
Returns the name of this remote file.

Returns:
Name of this file.

getNormalizedName

String getNormalizedName()
Returns the normalized name of this remote file.

Returns:
normalized name.

getPath

String getPath()
Returns the full path of this remote file.

Returns:
Path of this remote file.

getNormalizedPath

String getNormalizedPath()
Returns the normalized path.

Returns:
normalized path.

getExtension

String getExtension()
Returns the extension of this file. Extensions are used to determine the type of file when a file is to be transferred from/to the remote system.

Returns:
extension of this file.

getType

String getType()
Returns the type of this file.

Returns:
Type of this file.

getSize

long getSize()
Returns the size of this file in bytes.

Returns:
size of this file in bytes.

getLastModified

long getLastModified()
Returns the last modified date of this file in milli seconds.

Returns:
Last modified date of this file. If the last modified date is unknown a value of -1L may be returned.

isDirectory

boolean isDirectory()
Tells whether this file is a directory or not.

Returns:
true, if this file is a directory. false otherwise.

isFile

boolean isFile()
Tells whether this file is a data file or not.

Returns:
true, if this file is a data file. false otherwise.

isLink

boolean isLink()
Checkes to see if this file is symbolic link.

Returns:
true, if this file is a symbolic link. false, otherwsie.

getAttributes

String getAttributes()
Returns the attributes of this file in standard unix format.

Returns:
attributes of this file. May return blank if the attributes are unknown.

getOtherProperties

Hashtable getOtherProperties()
Returns additional properties of this file if any.

Returns:
additional properties. May return null if there are no additional properties.

getLinkCount

int getLinkCount()
Returns the number of links that point to this file.

Returns:
link count

getOwner

String getOwner()
Returns the owner of this file.

Returns:
Owner.

getGroup

String getGroup()
Returns the group name to which the owner of this file belongs to.

Returns:
group name.

setAttributes

void setAttributes(String attributes)
Sets the attributes on this file to the given attributes.

Parameters:
attributes - new attributes to set.


Copyright © 2000-2012 jMethods, Inc.. All Rights Reserved.