java.lang.Object
org.codelibs.jcifs.smb.internal.fscc.FileRenameInformation2
- All Implemented Interfaces:
Decodable,Encodable,FileInformation
File System Control Code (FSCC) structure for File Rename Information.
Used in SMB2/SMB3 set file information operations to rename files or directories,
with support for specifying whether to replace existing files with the same name.
- Author:
- mbechler
-
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.FileRenameInformation2(String name, boolean replaceIfExists) Constructs file rename 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.byteGets the file information level/class for this file information object.intsize()Returns the size in bytes that this object will occupy when encoded.
-
Constructor Details
-
FileRenameInformation2
public FileRenameInformation2()Default constructor for decoding. -
FileRenameInformation2
Constructs file rename information.- Parameters:
name- the new file namereplaceIfExists- whether to replace if the target file exists
-
-
Method Details
-
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:
-
encode
public int encode(byte[] dst, int dstIndex) Encodes this object into the specified byte array. -
size
public int size()Returns the size in bytes that this object will occupy when encoded. -
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:
-