com.enterprisedt.net.ftp
Class FTPFile

java.lang.Object
  extended bycom.enterprisedt.net.ftp.FTPFile

public class FTPFile
extends java.lang.Object

Represents a remote file (implementation)

Version:
$Revision: 1.11 $
Author:
Bruce Blackshaw

Field Summary
protected static java.lang.String cvsId
          Revision control id
protected  java.lang.String group
          Group if known
protected  boolean isDir
          Is this a directory?
protected  boolean isLink
          Is this file a symbolic link?
protected  java.util.Date lastModified
          Last modified
protected  int linkCount
          Number of links to file
protected  java.lang.String linkedname
          Name of file this is linked to
protected  java.lang.String name
          File/dir name
protected  java.lang.String owner
          Owner if known
protected  java.lang.String permissions
          Permission bits string
protected  java.lang.String raw
          Raw string
protected  long size
          Size of file
static int UNIX
          UNIX type
static int UNKNOWN
          Unknown remote server type
static int VMS
          VMS type
static int WINDOWS
          Windows type
 
Constructor Summary
FTPFile(int type, java.lang.String raw, java.lang.String name, long size, boolean isDir, java.util.Date lastModified)
          Deprecated. 'type' no longer used.
FTPFile(java.lang.String raw, java.lang.String name, long size, boolean isDir, java.util.Date lastModified)
          Constructor
 
Method Summary
 java.lang.String getGroup()
           
 int getLinkCount()
           
 java.lang.String getLinkedname()
           
 java.lang.String getName()
           
 java.lang.String getOwner()
           
 java.lang.String getPermissions()
           
 java.lang.String getRaw()
           
 int getType()
          Deprecated. No longer necessary.
 boolean isDir()
           
 boolean isLink()
           
 java.util.Date lastModified()
           
 void setLinkCount(int linkCount)
           
 long size()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cvsId

protected static java.lang.String cvsId
Revision control id


UNKNOWN

public static final int UNKNOWN
Unknown remote server type

See Also:
Constant Field Values

WINDOWS

public static final int WINDOWS
Windows type

See Also:
Constant Field Values

UNIX

public static final int UNIX
UNIX type

See Also:
Constant Field Values

VMS

public static final int VMS
VMS type

See Also:
Constant Field Values

isLink

protected boolean isLink
Is this file a symbolic link?


linkCount

protected int linkCount
Number of links to file


permissions

protected java.lang.String permissions
Permission bits string


isDir

protected boolean isDir
Is this a directory?


size

protected long size
Size of file


name

protected java.lang.String name
File/dir name


linkedname

protected java.lang.String linkedname
Name of file this is linked to


owner

protected java.lang.String owner
Owner if known


group

protected java.lang.String group
Group if known


lastModified

protected java.util.Date lastModified
Last modified


raw

protected java.lang.String raw
Raw string

Constructor Detail

FTPFile

public FTPFile(int type,
               java.lang.String raw,
               java.lang.String name,
               long size,
               boolean isDir,
               java.util.Date lastModified)
Deprecated. 'type' no longer used.

Constructor

Parameters:
type - type of file
raw - raw string returned from server
name - name of file
size - size of file
isDir - true if a directory
lastModified - last modified timestamp

FTPFile

public FTPFile(java.lang.String raw,
               java.lang.String name,
               long size,
               boolean isDir,
               java.util.Date lastModified)
Constructor

Parameters:
raw - raw string returned from server
name - name of file
size - size of file
isDir - true if a directory
lastModified - last modified timestamp
Method Detail

getType

public int getType()
Deprecated. No longer necessary.

Get the type of file, i.e UNIX

Returns:
the integer type of the file

getGroup

public java.lang.String getGroup()
Returns:
Returns the group.

isDir

public boolean isDir()
Returns:
Returns the isDir.

lastModified

public java.util.Date lastModified()
Returns:
Returns the lastModified date.

getName

public java.lang.String getName()
Returns:
Returns the name.

getOwner

public java.lang.String getOwner()
Returns:
Returns the owner.

getRaw

public java.lang.String getRaw()
Returns:
Returns the raw server string.

size

public long size()
Returns:
Returns the size.

getPermissions

public java.lang.String getPermissions()
Returns:
Returns the permissions.

isLink

public boolean isLink()
Returns:
Returns true if file is a symlink

getLinkCount

public int getLinkCount()
Returns:
Returns the number of links to the file

getLinkedname

public java.lang.String getLinkedname()
Returns:
Returns the linkedname.

setLinkCount

public void setLinkCount(int linkCount)
Parameters:
linkCount - new link count

toString

public java.lang.String toString()
Returns:
string representation


Copyright (c) 2001-2004 Enterprise Distributed Technologies Ltd. All Rights Reserved.