Module jcifs

Class FileBothDirectoryInfo

java.lang.Object
org.codelibs.jcifs.smb.internal.fscc.FileBothDirectoryInfo
All Implemented Interfaces:
Decodable, FileEntry

public class FileBothDirectoryInfo extends Object implements FileEntry, Decodable
Represents the FILE_BOTH_DIR_INFORMATION structure used in SMB directory enumeration operations. This structure contains comprehensive file information including timestamps, attributes, sizes, short name (8.3 format), and full filename for directory entries.
  • Constructor Details

    • FileBothDirectoryInfo

      public FileBothDirectoryInfo(Configuration config, boolean unicode)
      Constructs a file both directory info.
      Parameters:
      config - the configuration
      unicode - whether to use unicode encoding
  • Method Details

    • getName

      public String getName()
      Description copied from interface: FileEntry
      Gets the file name.
      Specified by:
      getName in interface FileEntry
      Returns:
      the file name
    • getType

      public int getType()
      Description copied from interface: FileEntry
      Gets the file type.
      Specified by:
      getType in interface FileEntry
      Returns:
      the file type
    • getFileIndex

      public int getFileIndex()
      Description copied from interface: FileEntry
      Gets the file index.
      Specified by:
      getFileIndex in interface FileEntry
      Returns:
      the fileIndex
    • getFilename

      public String getFilename()
      Gets the filename.
      Returns:
      the filename
    • getAttributes

      public int getAttributes()
      Description copied from interface: FileEntry
      Gets the file attributes.
      Specified by:
      getAttributes in interface FileEntry
      Returns:
      the file attributes
    • createTime

      public long createTime()
      Description copied from interface: FileEntry
      Gets the file creation time.
      Specified by:
      createTime in interface FileEntry
      Returns:
      the creation time in milliseconds since epoch
    • lastModified

      public long lastModified()
      Description copied from interface: FileEntry
      Gets the last modified time.
      Specified by:
      lastModified in interface FileEntry
      Returns:
      the last modified time in milliseconds since epoch
    • lastAccess

      public long lastAccess()
      Description copied from interface: FileEntry
      Gets the last access time.
      Specified by:
      lastAccess in interface FileEntry
      Returns:
      the last access time in milliseconds since epoch
    • length

      public long length()
      Description copied from interface: FileEntry
      Gets the file size.
      Specified by:
      length in interface FileEntry
      Returns:
      the file size in bytes
    • getNextEntryOffset

      public int getNextEntryOffset()
      Gets the offset to the next entry.
      Returns:
      the next entry offset in bytes
    • decode

      public int decode(byte[] buffer, int bufferIndex, int len) throws SMBProtocolDecodingException
      Decode data from a byte buffer
      Specified by:
      decode in interface Decodable
      Parameters:
      buffer - the byte buffer containing the data to decode
      bufferIndex - the starting index in the buffer
      len - the maximum length of data to decode
      Returns:
      decoded length
      Throws:
      SMBProtocolDecodingException - if decoding fails
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object