public final class SharedDirectory extends AbstractSharedItem<SharedDirectory>
PATH_SEPARATOR, ROOT_PATH| 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.
|
getDiskShare, getName, getParentPath, getPath, getRootPath, getServerName, getSharedConnection, getShareName, getSmbPath, isDirectory, isExisting, isFile, isRootPathpublic SharedDirectory(SharedConnection sharedConnection, String pathName)
sharedConnection - Shared connectionpathName - Path namepublic SharedDirectory(SharedConnection sharedConnection)
sharedConnection - Shared connectionpublic 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.