Module jcifs

Interface SmbFileHandle

All Superinterfaces:
AutoCloseable

public interface SmbFileHandle extends AutoCloseable
Handle to an open file
Author:
mbechler
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    void
    close(long lastWriteTime)
    Closes this file handle and optionally sets the last write time
    long
    Returns the initial size of the file when it was opened
    Returns the tree handle associated with this file handle
    boolean
    Checks if this file handle is still valid
    void
    Releases this file handle without closing it
  • Method Details

    • getTree

      SmbTreeHandle getTree()
      Returns the tree handle associated with this file handle
      Returns:
      the tree
    • isValid

      boolean isValid()
      Checks if this file handle is still valid
      Returns:
      whether the file descriptor is valid
    • close

      void close(long lastWriteTime) throws CIFSException
      Closes this file handle and optionally sets the last write time
      Parameters:
      lastWriteTime - the last write time to set, or 0 to leave unchanged
      Throws:
      CIFSException - if an error occurs while closing the file
    • close

      void close() throws CIFSException
      Specified by:
      close in interface AutoCloseable
      Throws:
      CIFSException
      See Also:
    • release

      void release() throws CIFSException
      Releases this file handle without closing it
      Throws:
      CIFSException - if an error occurs while releasing the handle
    • getInitialSize

      long getInitialSize()
      Returns the initial size of the file when it was opened
      Returns:
      the file size when it was opened