public class DiskShare extends Share
smbPath, treeConnect| Constructor and Description |
|---|
DiskShare(SmbPath smbPath,
TreeConnect treeConnect) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkAccessMask(AccessMask mask,
java.lang.String smbPathOnShare) |
boolean |
fileExists(java.lang.String path)
File in the given path exists or not
|
boolean |
folderExists(java.lang.String path)
Folder in the given path exists or not.
|
com.hierynomus.smbj.share.DiskEntry |
getFile(java.lang.String path) |
FileInfo |
getFileInformation(SMB2FileId fileId)
Get information for a given fileId
|
FileInfo |
getFileInformation(java.lang.String path)
Get information about the given path.
|
SecurityDescriptor |
getSecurityInfo(SMB2FileId fileId,
java.util.EnumSet<SecurityInformation> securityInfo)
The SecurityDescriptor(MS-DTYP 2.4.6 SECURITY_DESCRIPTOR) for the Given FileId
|
SecurityDescriptor |
getSecurityInfo(java.lang.String path,
java.util.EnumSet<SecurityInformation> securityInfo)
The SecurityDescriptor(MS-DTYP 2.4.6 SECURITY_DESCRIPTOR) for the Given Path
|
java.util.List<FileInfo> |
list(java.lang.String path)
Get a listing the given directory path.
|
void |
mkdir(java.lang.String path)
Create a directory in the given path.
|
Directory |
openDirectory(java.lang.String path,
java.util.EnumSet<AccessMask> accessMask,
java.util.EnumSet<SMB2ShareAccess> shareAccess,
SMB2CreateDisposition createDisposition)
Get a handle to a directory in the given path
|
File |
openFile(java.lang.String path,
java.util.EnumSet<AccessMask> accessMask,
SMB2CreateDisposition createDisposition)
Get a handle to a file
|
void |
rm(java.lang.String path)
Remove the file at the given path
|
void |
rmdir(java.lang.String path,
boolean recursive)
Remove the directory at the given path.
|
close, close, getTreeConnect, isConnected, open, openFileRequestpublic DiskShare(SmbPath smbPath, TreeConnect treeConnect)
public java.util.List<FileInfo> list(java.lang.String path) throws SMBApiException, TransportException
SMBApiExceptionTransportExceptionpublic com.hierynomus.smbj.share.DiskEntry getFile(java.lang.String path)
public Directory openDirectory(java.lang.String path, java.util.EnumSet<AccessMask> accessMask, java.util.EnumSet<SMB2ShareAccess> shareAccess, SMB2CreateDisposition createDisposition) throws TransportException, SMBApiException
TransportExceptionSMBApiExceptionpublic File openFile(java.lang.String path, java.util.EnumSet<AccessMask> accessMask, SMB2CreateDisposition createDisposition) throws TransportException, SMBApiException
TransportExceptionSMBApiExceptionpublic boolean fileExists(java.lang.String path)
throws SMBApiException
SMBApiExceptionpublic boolean folderExists(java.lang.String path)
throws SMBApiException
SMBApiExceptionpublic void mkdir(java.lang.String path)
throws TransportException,
SMBApiException
TransportExceptionSMBApiExceptionpublic FileInfo getFileInformation(java.lang.String path) throws SMBApiException
SMBApiExceptionpublic FileInfo getFileInformation(SMB2FileId fileId) throws SMBApiException, TransportException
SMBApiExceptionTransportExceptionpublic void rmdir(java.lang.String path,
boolean recursive)
throws TransportException,
SMBApiException
TransportExceptionSMBApiExceptionpublic void rm(java.lang.String path)
throws TransportException,
SMBApiException
TransportExceptionSMBApiExceptionpublic SecurityDescriptor getSecurityInfo(java.lang.String path, java.util.EnumSet<SecurityInformation> securityInfo) throws SMBApiException, TransportException
SMBApiExceptionTransportExceptionpublic SecurityDescriptor getSecurityInfo(SMB2FileId fileId, java.util.EnumSet<SecurityInformation> securityInfo) throws SMBApiException, TransportException
SMBApiExceptionTransportExceptionpublic boolean checkAccessMask(AccessMask mask, java.lang.String smbPathOnShare)