Package com.hierynomus.smbj.share
Class DiskEntry
- java.lang.Object
-
- com.hierynomus.smbj.share.Open<DiskShare>
-
- com.hierynomus.smbj.share.DiskEntry
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.hierynomus.smbj.share.Open
Open.LockBuilder
-
-
Method Summary
Modifier and Type Method Description voidcloseNoWait()voidcreateHardlink(java.lang.String linkname)Creates hard link for receiver.
This method is a shortcut forDiskEntry#createHardlink(linkname, false)voidcreateHardlink(java.lang.String linkname, boolean replaceIfExist)Creates hard link for receiver.voiddeleteOnClose()booleanequals(java.lang.Object obj)voidflush()DiskSharegetDiskShare()FileAllInformationgetFileInformation()<F extends FileQueryableInformation>
FgetFileInformation(java.lang.Class<F> informationClass)java.lang.StringgetFileName()Deprecated.as of 0.11.0 usegetUncPath()instead.java.lang.StringgetPath()Gets the relative path of this disk entry.SecurityDescriptorgetSecurityInformation(java.util.Set<SecurityInformation> securityInfo)java.lang.StringgetUncPath()Gets the UNC path of this disk entry.inthashCode()byte[]ioctl(int ctlCode, boolean isFsCtl, byte[] inData, int inOffset, int inLength)Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.intioctl(int ctlCode, boolean isFsCtl, byte[] inData, int inOffset, int inLength, byte[] outData, int outOffset, int outLength)Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.byte[]ioctl(int ctlCode, boolean isFsCtl, byte[] inData, int inOffset, int inLength, int maxOutputResponse)Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.voidrename(java.lang.String newName)voidrename(java.lang.String newName, boolean replaceIfExist)voidrename(java.lang.String newName, boolean replaceIfExist, long rootDirectory)<F extends FileSettableInformation>
voidsetFileInformation(F information)voidsetSecurityInformation(SecurityDescriptor securityDescriptor)voidsetSecurityInformation(SecurityDescriptor securityDescriptor, java.util.Set<SecurityInformation> securityInfo)-
Methods inherited from class com.hierynomus.smbj.share.Open
close, closeSilently, getFileId, requestLock
-
-
-
-
Method Detail
-
closeNoWait
public void closeNoWait()
-
getFileName
@Deprecated public java.lang.String getFileName()
Deprecated.as of 0.11.0 usegetUncPath()instead.Gets the UNC path of this disk entry.- Returns:
- The UNC path of this disk entry.
-
getUncPath
public java.lang.String getUncPath()
Gets the UNC path of this disk entry.- Returns:
- The UNC path of this disk entry. Example: \\192.168.1.51\share\folder0\test1.txt
-
getPath
public java.lang.String getPath()
Gets the relative path of this disk entry.- Returns:
- The relative path of this disk entry. Example: folder0/test1.txt
-
getDiskShare
public DiskShare getDiskShare()
-
getFileInformation
public FileAllInformation getFileInformation() throws SMBApiException
- Throws:
SMBApiException
-
getFileInformation
public <F extends FileQueryableInformation> F getFileInformation(java.lang.Class<F> informationClass) throws SMBApiException
- Throws:
SMBApiException
-
setFileInformation
public <F extends FileSettableInformation> void setFileInformation(F information)
-
getSecurityInformation
public SecurityDescriptor getSecurityInformation(java.util.Set<SecurityInformation> securityInfo) throws SMBApiException
- Throws:
SMBApiException
-
setSecurityInformation
public void setSecurityInformation(SecurityDescriptor securityDescriptor) throws SMBApiException
- Throws:
SMBApiException
-
setSecurityInformation
public void setSecurityInformation(SecurityDescriptor securityDescriptor, java.util.Set<SecurityInformation> securityInfo) throws SMBApiException
- Throws:
SMBApiException
-
rename
public void rename(java.lang.String newName) throws SMBApiException- Throws:
SMBApiException
-
rename
public void rename(java.lang.String newName, boolean replaceIfExist) throws SMBApiException- Throws:
SMBApiException
-
rename
public void rename(java.lang.String newName, boolean replaceIfExist, long rootDirectory) throws SMBApiException- Throws:
SMBApiException
-
createHardlink
public void createHardlink(java.lang.String linkname) throws SMBApiExceptionCreates hard link for receiver.
This method is a shortcut forDiskEntry#createHardlink(linkname, false)- Parameters:
linkname- the path to the hard link relative to share- Throws:
SMBApiException
-
createHardlink
public void createHardlink(java.lang.String linkname, boolean replaceIfExist) throws SMBApiExceptionCreates hard link for receiver.- Parameters:
linkname- the path to the hard link relative to sharereplaceIfExist- if true replaces existing entry.- Throws:
SMBApiException
-
ioctl
public byte[] ioctl(int ctlCode, boolean isFsCtl, byte[] inData, int inOffset, int inLength)Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.- Parameters:
ctlCode- the control codeisFsCtl- true if the control code is an FSCTL; false if it is an IOCTLinData- the control code dependent input datainOffset- the offset ininDatawhere the input data startsinLength- the number of bytes frominDatato send, starting atoffset- Returns:
- the response data or
nullif the control code did not produce a response
-
ioctl
public byte[] ioctl(int ctlCode, boolean isFsCtl, byte[] inData, int inOffset, int inLength, int maxOutputResponse)Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.- Parameters:
ctlCode- the control codeisFsCtl- true if the control code is an FSCTL; false if it is an IOCTLinData- the control code dependent input datainOffset- the offset ininDatawhere the input data startsinLength- the number of bytes frominDatato send, starting atoffsetmaxOutputResponse- the maximum number of bytes that the server can return for the output data in the SMB2 IOCTL Response.- Returns:
- the response data or
nullif the control code did not produce a response
-
ioctl
public int ioctl(int ctlCode, boolean isFsCtl, byte[] inData, int inOffset, int inLength, byte[] outData, int outOffset, int outLength)Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.- Parameters:
ctlCode- the control codeisFsCtl- true if the control code is an FSCTL; false if it is an IOCTLinData- the control code dependent input datainOffset- the offset ininDatawhere the input data startsinLength- the number of bytes frominDatato send, starting atinOffsetoutData- the buffer where the response data should be writtenoutOffset- the offset inoutDatawhere the output data should be writtenoutLength- the maximum amount of data to write inoutData, starting atoutOffset- Returns:
- the number of bytes written to
outData
-
flush
public void flush()
-
deleteOnClose
public void deleteOnClose()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-