com.jscape.filetransfer

## Class FileTransferRemoteFile

- java.lang.Object
- - com.jscape.filetransfer.FileTransferRemoteFile

-     public class FileTransferRemoteFile
      extends java.lang.Object

  Represents a file returned in a remote directory listing.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `FileTransferRemoteFile.Filter`
    `static class` | `FileTransferRemoteFile.NaturalComparator`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static FileTransferRemoteFile.Filter` | `DIRECTORY_FILTER`
    `static FileTransferRemoteFile.Filter` | `FILE_FILTER`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileTransferRemoteFile()` Empty constructor.
    `FileTransferRemoteFile(java.lang.String filename, java.lang.String linkTarget, boolean directory, boolean link, long filesize, java.util.Date fileDate, boolean readable, boolean writable)` Constructor.
    `FileTransferRemoteFile(java.lang.String filename, java.lang.String linkTarget, boolean directory, boolean link, long filesize, java.util.Date fileDate, boolean readable, boolean writable, boolean yearSet)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Date` | `getFileDate()` Gets the last modified date file.
    `java.lang.String` | `getFilename()` Gets filename.
    `long` | `getFilesize()` Gets filesize.
    `boolean` | `getIsYearSet()` Is year set?
    `java.lang.String` | `getLinkTarget()` Gets target of symbolic link.
    `boolean` | `isDirectory()` Checks if remote file is a directory.
    `boolean` | `isHidden()` Checks if the filename is a hidden filename by checking to see if filename begins with a period.
    `boolean` | `isLink()` Checks if remote files is a symbolic link.
    `boolean` | `isReadable()` Checks if filename is readable.
    `boolean` | `isWritable()` Checks if filename is writable.
    `void` | `setDirectory(boolean value)` Sets if file is a directory.
    `void` | `setFileDate(java.util.Date value)` Sets the last modified date file.
    `void` | `setFilename(java.lang.String value)` Sets remote filename.
    `void` | `setFilesize(long value)` Sets remote filesize.
    `void` | `setIsYearSet(boolean value)` Is the year of the file date set?
    `void` | `setLink(boolean value)` Sets if is a symbolic link.
    `void` | `setLinkTarget(java.lang.String string)` Sets link target.
    `void` | `setReadable(boolean value)` Sets filename "readable" flag.
    `void` | `setWritable(boolean value)` Sets filename "writable" flag.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### FILE_FILTER

          public static final FileTransferRemoteFile.Filter FILE_FILTER

    - #### DIRECTORY_FILTER

          public static final FileTransferRemoteFile.Filter DIRECTORY_FILTER

  - ### Constructor Detail

    - #### FileTransferRemoteFile

          public FileTransferRemoteFile(java.lang.String filename,
                                        java.lang.String linkTarget,
                                        boolean directory,
                                        boolean link,
                                        long filesize,
                                        java.util.Date fileDate,
                                        boolean readable,
                                        boolean writable,
                                        boolean yearSet)

      Constructor.
      Parameters:
        `filename` -
        `linkTarget` -
        `directory` -
        `link` -
        `filesize` -
        `fileDate` -
        `readable` -
        `writable` -
        `yearSet` -

    - #### FileTransferRemoteFile

          public FileTransferRemoteFile(java.lang.String filename,
                                        java.lang.String linkTarget,
                                        boolean directory,
                                        boolean link,
                                        long filesize,
                                        java.util.Date fileDate,
                                        boolean readable,
                                        boolean writable)

      Constructor.
      Parameters:
        `filename` - filename
        `linkTarget` - linkTarget
        `directory` - directory
        `link` - link
        `filesize` - filesize
        `fileDate` - fileDate
        `readable` - readable
        `writable` - writable

    - #### FileTransferRemoteFile

          public FileTransferRemoteFile()

      Empty constructor.

  - ### Method Detail

    - #### getFilename

          public java.lang.String getFilename()

      Gets filename.
      Returns:
        filename

    - #### setFilename

          public void setFilename(java.lang.String value)

      Sets remote filename.
      Parameters:
        `value` - filename

    - #### getLinkTarget

          public java.lang.String getLinkTarget()

      Gets target of symbolic link.
      Returns:
        path or null if not a symbolic link

    - #### setLinkTarget

          public void setLinkTarget(java.lang.String string)

      Sets link target.
      Parameters:
        `string` - target path of symbolic link

    - #### isDirectory

          public boolean isDirectory()

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

    - #### setDirectory

          public void setDirectory(boolean value)

      Sets if file is a directory.
      Parameters:
        `value` - true if directory, false otherwise

    - #### isLink

          public boolean isLink()

      Checks if remote files is a symbolic link.
      Returns:
        true if symbolic link, false otherwise

    - #### setLink

          public void setLink(boolean value)

      Sets if is a symbolic link.
      Parameters:
        `value` - true if symbolic link, false otherwise

    - #### getFilesize

          public long getFilesize()

      Gets filesize.
      Returns:
        filesize in bytes

    - #### setFilesize

          public void setFilesize(long value)

      Sets remote filesize.
      Parameters:
        `value` - filesize in bytes

    - #### getFileDate

          public java.util.Date getFileDate()

      Gets the last modified date file.
      Returns:
        Returns the last modified date

    - #### setFileDate

          public void setFileDate(java.util.Date value)

      Sets the last modified date file.
      Parameters:
        `value` - The last modified date

    - #### isReadable

          public boolean isReadable()

      Checks if filename is readable.
      Returns:
        `true` if filename is readable;

    - #### setReadable

          public void setReadable(boolean value)

      Sets filename "readable" flag.
      Parameters:
        `value` - if `true` filename will be marked as readable.

    - #### isWritable

          public boolean isWritable()

      Checks if filename is writable.
      Returns:
        `true` if filename is writable;

    - #### setWritable

          public void setWritable(boolean value)

      Sets filename "writable" flag.
      Parameters:
        `value` - if `true` filename will be marked as writable

    - #### isHidden

          public boolean isHidden()

      Checks if the filename is a hidden filename by checking to see if filename begins with a period.
      Returns:
        true if hidden, false otherwise

    - #### getIsYearSet

          public boolean getIsYearSet()

      Is year set?
      Returns:
        yearSet

    - #### setIsYearSet

          public void setIsYearSet(boolean value)

      Is the year of the file date set?
      Parameters:
        `value` -

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © JSCAPE LLC. 1999-2021. All Rights Reserved