Class FileSystemFile

    • Field Detail

      • log

        protected final org.slf4j.Logger log
    • Constructor Detail

      • FileSystemFile

        public FileSystemFile​(java.lang.String path)
      • FileSystemFile

        public FileSystemFile​(java.io.File file)
    • Method Detail

      • getFile

        public java.io.File getFile()
      • getInputStream

        public java.io.InputStream getInputStream()
                                           throws java.io.IOException
        Specified by:
        getInputStream in interface LocalSourceFile
        Throws:
        java.io.IOException
      • getOutputStream

        public java.io.OutputStream getOutputStream()
                                             throws java.io.IOException
        Specified by:
        getOutputStream in interface LocalDestFile
        Throws:
        java.io.IOException
      • getLastAccessTime

        public long getLastAccessTime()
                               throws java.io.IOException
        Description copied from interface: LocalSourceFile
        Returns last access time for the underlying file.
        Specified by:
        getLastAccessTime in interface LocalSourceFile
        Returns:
        time in seconds since Unix epoch
        Throws:
        java.io.IOException
      • getLastModifiedTime

        public long getLastModifiedTime()
                                 throws java.io.IOException
        Description copied from interface: LocalSourceFile
        Returns last access time for the underlying file.
        Specified by:
        getLastModifiedTime in interface LocalSourceFile
        Returns:
        time in seconds since Unix epoch
        Throws:
        java.io.IOException
      • getPermissions

        public int getPermissions()
                           throws java.io.IOException
        Description copied from interface: LocalSourceFile
        Returns the permissions for the underlying file
        Specified by:
        getPermissions in interface LocalSourceFile
        Returns:
        permissions e.g. 0644
        Throws:
        java.io.IOException
      • setLastAccessedTime

        public void setLastAccessedTime​(long t)
                                 throws java.io.IOException
        Description copied from interface: LocalDestFile
        Set the last access time for the underlying file.
        Specified by:
        setLastAccessedTime in interface LocalDestFile
        Parameters:
        t - time in seconds since Unix epoch
        Throws:
        java.io.IOException
      • setLastModifiedTime

        public void setLastModifiedTime​(long t)
                                 throws java.io.IOException
        Description copied from interface: LocalDestFile
        Set the last modified time for the underlying file.
        Specified by:
        setLastModifiedTime in interface LocalDestFile
        Parameters:
        t - time in seconds since Unix epoch
        Throws:
        java.io.IOException
      • setPermissions

        public void setPermissions​(int perms)
                            throws java.io.IOException
        Description copied from interface: LocalDestFile
        Set the permissions for the underlying file.
        Specified by:
        setPermissions in interface LocalDestFile
        Parameters:
        perms - permissions e.g. 0644
        Throws:
        java.io.IOException
      • getChild

        public FileSystemFile getChild​(java.lang.String name)
        Specified by:
        getChild in interface LocalDestFile
        Returns:
        A child file/directory of this directory with given name.
      • getTargetFile

        public FileSystemFile getTargetFile​(java.lang.String filename)
                                     throws java.io.IOException
        Description copied from interface: LocalDestFile
        Allows caller to express intent that caller expects to write to file with filename. Based on this information, an implementation may return an alternate file to write to, which should be respected by the caller.
        Specified by:
        getTargetFile in interface LocalDestFile
        Throws:
        java.io.IOException
      • getTargetDirectory

        public FileSystemFile getTargetDirectory​(java.lang.String dirname)
                                          throws java.io.IOException
        Description copied from interface: LocalDestFile
        Allows caller to express intent that caller expects to write to directory with dirname. Based on this information, an implementation may return an alternate directory to write to, which should be respected by the caller.
        Specified by:
        getTargetDirectory in interface LocalDestFile
        Throws:
        java.io.IOException
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object