T - Generic type that defined a directory/file like node that is used for item creationpublic abstract class AbstractSharedItem<T extends SharedItem> extends Object implements SharedItem
| Modifier and Type | Field and Description |
|---|---|
protected com.hierynomus.smbj.share.DiskShare |
diskShare
Disk share that is used for accessing the Samba share.
|
protected com.hierynomus.smbj.common.SmbPath |
smbPath
Path name information that are used for all operations.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSharedItem(AbstractSharedItem abstractSharedItem,
String pathName)
Create an abstract shared item via copy constructor and a new path name.
|
|
AbstractSharedItem(String serverName,
String shareName,
String pathName,
com.hierynomus.smbj.auth.AuthenticationContext authenticationContext)
Create a new abstract shared item based on the server name, share name, path name and the authentication.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract T |
createSharedNodeItem(String pathName)
Create a new shared item.
|
abstract boolean |
equals(Object object)
Check if the current and the given objects are equals.
|
String |
getName()
Get the name of the shared item.
|
T |
getParentPath()
Get the parent shared item.
|
String |
getPath()
Get the path of the shared item.
|
T |
getRootPath()
Get the root shared item.
|
String |
getServerName()
Get the server name of the connected server.
|
String |
getShareName()
Get the share name of the connected server.
|
String |
getSmbPath()
Get the full SMB path including the server, share and path, separated by backslashes.
|
boolean |
isDirectory()
Check if the shared item is a directory.
|
boolean |
isExisting()
Check if the shared item does exist.
|
boolean |
isFile()
Check if the shared item is a file.
|
boolean |
isRootPath()
Check if the current shared item or its parent is the root shared item.
|
protected final com.hierynomus.smbj.share.DiskShare diskShare
protected final com.hierynomus.smbj.common.SmbPath smbPath
public AbstractSharedItem(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 problemprotected AbstractSharedItem(AbstractSharedItem abstractSharedItem, String pathName)
abstractSharedItem - Shared item that will be reusedpathName - New path namepublic boolean isExisting()
isExisting in interface SharedItempublic boolean isDirectory()
isDirectory in interface SharedItempublic boolean isFile()
isFile in interface SharedItempublic String getName()
getName in interface SharedItempublic String getServerName()
getServerName in interface SharedItempublic String getShareName()
getShareName in interface SharedItempublic String getSmbPath()
getSmbPath in interface SharedItempublic String getPath()
getPath in interface SharedItempublic T getParentPath()
getParentPath in interface SharedItempublic T getRootPath()
getRootPath in interface SharedItempublic boolean isRootPath()
isRootPath in interface SharedItempublic abstract boolean equals(Object object)
Copyright © 2018. All rights reserved.