java.lang.Object
org.codelibs.jcifs.smb.internal.fscc.FileBasicInfo
- All Implemented Interfaces:
Decodable,Encodable,BasicFileInformation,FileInformation,SmbBasicFileInfo
Represents the FILE_BASIC_INFORMATION structure used in SMB2/3 file system control code (FSCC) operations.
This structure contains basic file information including creation time, last access time, last write time,
change time, and file attributes for querying and setting file metadata.
-
Field Summary
Fields inherited from interface org.codelibs.jcifs.smb.internal.fscc.FileInformation
FILE_BASIC_INFO, FILE_ENDOFFILE_INFO, FILE_INTERNAL_INFO, FILE_RENAME_INFO, FILE_STANDARD_INFO -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for decoding.FileBasicInfo(long create, long lastAccess, long lastWrite, long change, int attributes) Constructs file basic information. -
Method Summary
Modifier and TypeMethodDescriptionintdecode(byte[] buffer, int bufferIndex, int len) Decode data from a byte bufferintencode(byte[] dst, int dstIndex) Encodes this object into the specified byte array.intGets the file attributes.longGets the file creation time.byteGets the file information level/class for this file information object.longGets the file last access time.longGets the file last write time.longgetSize()Gets the file size in bytes.intsize()Returns the size in bytes that this object will occupy when encoded.toString()
-
Constructor Details
-
FileBasicInfo
public FileBasicInfo()Default constructor for decoding. -
FileBasicInfo
public FileBasicInfo(long create, long lastAccess, long lastWrite, long change, int attributes) Constructs file basic information.- Parameters:
create- file creation timelastAccess- last access timelastWrite- last write timechange- last change timeattributes- file attributes
-
-
Method Details
-
getFileInformationLevel
public byte getFileInformationLevel()Gets the file information level/class for this file information object.- Specified by:
getFileInformationLevelin interfaceFileInformation- Returns:
- the file information class
- See Also:
-
getAttributes
public int getAttributes()Description copied from interface:SmbBasicFileInfoGets the file attributes.- Specified by:
getAttributesin interfaceSmbBasicFileInfo- Returns:
- file attributes
-
getCreateTime
public long getCreateTime()Description copied from interface:SmbBasicFileInfoGets the file creation time.- Specified by:
getCreateTimein interfaceSmbBasicFileInfo- Returns:
- file create time
-
getLastWriteTime
public long getLastWriteTime()Description copied from interface:SmbBasicFileInfoGets the file last write time.- Specified by:
getLastWriteTimein interfaceSmbBasicFileInfo- Returns:
- file last write time
-
getLastAccessTime
public long getLastAccessTime()Description copied from interface:SmbBasicFileInfoGets the file last access time.- Specified by:
getLastAccessTimein interfaceSmbBasicFileInfo- Returns:
- file last access time
-
getSize
public long getSize()Description copied from interface:SmbBasicFileInfoGets the file size in bytes.- Specified by:
getSizein interfaceSmbBasicFileInfo- Returns:
- file size
-
decode
Decode data from a byte buffer- Specified by:
decodein interfaceDecodable- Parameters:
buffer- the byte buffer containing the data to decodebufferIndex- the starting index in the bufferlen- 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. -
encode
public int encode(byte[] dst, int dstIndex) Encodes this object into the specified byte array. -
toString
-