public final class SharedDirectory extends AbstractSharedItem<SharedDirectory>
pathName, sharedConnection| Constructor and Description |
|---|
SharedDirectory(SharedConnection sharedConnection)
Create a new shared directory based on the shared connection.
|
SharedDirectory(SharedConnection sharedConnection,
String pathName)
Create a new shared directory based on the shared connection and the path name.
|
| 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(SharedConnection sharedConnection, String pathName) throws IOException
sharedConnection - Shared connectionpathName - Path nameIOException - Exception in case of a problempublic SharedDirectory(SharedConnection sharedConnection) throws IOException
sharedConnection - Shared connectionIOException - Exception in case of a problempublic SharedDirectory createDirectoryInCurrentDirectory(String directoryName) throws IOException
directoryName - Name of the new directoryIOException - Exception in case of a problempublic SharedFile createFileInCurrentDirectory(String fileName) throws IOException
fileName - Name of the new fileIOException - Exception in case of a problempublic void createDirectory()
public void deleteDirectoryRecursively()
public List<SharedDirectory> getDirectories() throws IOException
IOException - Exception in case of a problempublic List<SharedFile> getFiles() throws IOException
IOException - Exception in case of a problempublic boolean equals(Object object)
equals in class AbstractSharedItem<SharedDirectory>object - Given object to compare againstprotected SharedDirectory createSharedNodeItem(String pathName) throws IOException
createSharedNodeItem in class AbstractSharedItem<SharedDirectory>pathName - Path name of the shared itemIOException - Exception in case of a problemCopyright © 2018. All rights reserved.