public final class SharedDirectory extends AbstractSharedItem<SharedDirectory>
diskShare, smbPath| Constructor and Description |
|---|
SharedDirectory(AbstractSharedItem abstractSharedItem,
String pathName)
Create shared directory via copy constructor and a new path name.
|
SharedDirectory(String serverName,
String shareName,
com.hierynomus.smbj.auth.AuthenticationContext authenticationContext)
Create a shared root directory based on the server name, share name and the authentication.
|
SharedDirectory(String serverName,
String shareName,
String pathName,
com.hierynomus.smbj.auth.AuthenticationContext authenticationContext)
Create a shared directory based on the server name, share name, path name and the authentication.
|
| Modifier and Type | Method and Description |
|---|---|
void |
createDirectory()
Create the current directory.
|
SharedDirectory |
createDirectoryInCurrentDirectory(String directoryName)
Create a directory in the current directory.
|
SharedFile |
createFileInCurrentDirectory(String fileName)
Create a file in the current directory.
|
protected SharedDirectory |
createSharedNodeItem(String pathName)
Create a new shared directory via factory.
|
void |
deleteDirectoryRecursively()
Delete the current directory with all its subdirectories and subfiles.
|
boolean |
equals(Object object)
Check if the current and the given objects are equals.
|
List<SharedDirectory> |
getDirectories()
Get all directories of the current directory.
|
List<SharedFile> |
getFiles()
Get all files of the current directory.
|
getName, getParentPath, getPath, getRootPath, getServerName, getShareName, getSmbPath, isDirectory, isExisting, isFile, isRootPathpublic SharedDirectory(String serverName, String shareName, String pathName, com.hierynomus.smbj.auth.AuthenticationContext authenticationContext) throws IOException
serverName - Name of the servershareName - Name of the sharepathName - Path nameauthenticationContext - Authentication for the connectionIOException - Exception in case of a problempublic SharedDirectory(String serverName, String shareName, com.hierynomus.smbj.auth.AuthenticationContext authenticationContext) throws IOException
serverName - Name of the servershareName - Name of the shareauthenticationContext - Authentication for the connectionIOException - Exception in case of a problempublic SharedDirectory(AbstractSharedItem abstractSharedItem, String pathName)
abstractSharedItem - Shared item that will be reusedpathName - New path namepublic SharedDirectory createDirectoryInCurrentDirectory(String directoryName)
directoryName - Name of the new directorypublic SharedFile createFileInCurrentDirectory(String fileName)
fileName - Name of the new filepublic void createDirectory()
public void deleteDirectoryRecursively()
public List<SharedDirectory> getDirectories()
public List<SharedFile> getFiles()
public boolean equals(Object object)
equals in class AbstractSharedItem<SharedDirectory>object - Given object to compare againstprotected SharedDirectory createSharedNodeItem(String pathName)
createSharedNodeItem in class AbstractSharedItem<SharedDirectory>pathName - Path name of the shared itemCopyright © 2018. All rights reserved.