Module jcifs

Class FileStandardInfo

java.lang.Object
org.codelibs.jcifs.smb.internal.fscc.FileStandardInfo
All Implemented Interfaces:
Decodable, Encodable, BasicFileInformation, FileInformation, SmbBasicFileInfo

public class FileStandardInfo extends Object implements BasicFileInformation
Represents the FILE_STANDARD_INFORMATION structure used in SMB2/3 file system control code (FSCC) operations. This structure provides standard file information including allocation size, end-of-file position, number of links, deletion status, and directory flag.
  • Constructor Details

    • FileStandardInfo

      public FileStandardInfo()
      Default constructor for decoding file standard information.
  • Method Details

    • getFileInformationLevel

      public byte getFileInformationLevel()
      Description copied from interface: FileInformation
      Gets the file information level/class for this file information object.
      Specified by:
      getFileInformationLevel in interface FileInformation
      Returns:
      the file information class
    • getAttributes

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

      public long getCreateTime()
      Description copied from interface: SmbBasicFileInfo
      Gets the file creation time.
      Specified by:
      getCreateTime in interface SmbBasicFileInfo
      Returns:
      file create time
    • getLastWriteTime

      public long getLastWriteTime()
      Description copied from interface: SmbBasicFileInfo
      Gets the file last write time.
      Specified by:
      getLastWriteTime in interface SmbBasicFileInfo
      Returns:
      file last write time
    • getLastAccessTime

      public long getLastAccessTime()
      Description copied from interface: SmbBasicFileInfo
      Gets the file last access time.
      Specified by:
      getLastAccessTime in interface SmbBasicFileInfo
      Returns:
      file last access time
    • getSize

      public long getSize()
      Description copied from interface: SmbBasicFileInfo
      Gets the file size in bytes.
      Specified by:
      getSize in interface SmbBasicFileInfo
      Returns:
      file size
    • 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:
    • size

      public int size()
      Returns the size in bytes that this object will occupy when encoded.
      Specified by:
      size in interface Encodable
      Returns:
      the encoded size
      See Also:
    • encode

      public int encode(byte[] dst, int dstIndex)
      Encodes this object into the specified byte array.
      Specified by:
      encode in interface Encodable
      Parameters:
      dst - the destination byte array to encode into
      dstIndex - the starting index in the destination array
      Returns:
      encoded length
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object