Class WindowsTempShare
java.lang.Object
org.sentrysoftware.wmi.windows.remote.share.WindowsTempShare
- Direct Known Subclasses:
WinTempShare
-
Constructor Summary
ConstructorDescriptionWindowsTempShare
(WindowsRemoteExecutor windowsRemoteExecutor, String shareNameOrUnc, String remotePath) Constructor of WindowsTempShare -
Method Summary
Modifier and TypeMethodDescriptionstatic void
createRemoteDirectory
(WindowsRemoteExecutor windowsRemoteExecutor, String remotePath, long timeout) Create the remote directory.static WindowsTempShare
getOrCreateShare
(WindowsRemoteExecutor windowsRemoteExecutor, long timeout, ShareRemoteDirectoryConsumer<WindowsRemoteExecutor, String, String, Long> shareRemoteDirectory) Get the existing share on the host or create it if absent.Get the remote pathGet the share nameGet the UNC path of the sharestatic String
getWindowsDirectory
(WindowsRemoteExecutor windowsRemoteExecutor, long timeout) Get the Windows directory.Get the WindowsRemoteExecutor instance
-
Constructor Details
-
WindowsTempShare
public WindowsTempShare(WindowsRemoteExecutor windowsRemoteExecutor, String shareNameOrUnc, String remotePath) Constructor of WindowsTempShare- Parameters:
windowsRemoteExecutor
- the WindowsRemoteExecutor instance connected to the remote host (mandatory)shareNameOrUnc
- The name of the share, or its full UNC path (mandatory)remotePath
- The path on the remote system of the directory being shared
-
-
Method Details
-
getWindowsDirectory
public static String getWindowsDirectory(WindowsRemoteExecutor windowsRemoteExecutor, long timeout) throws WindowsRemoteException, TimeoutException Get the Windows directory.- Parameters:
windowsRemoteExecutor
- WindowsRemoteExecutor instance. (mandatory)timeout
- Timeout in milliseconds. (throws an IllegalArgumentException if negative or zero)- Returns:
- The Windows directory.
- Throws:
WindowsRemoteException
- For any problem encountered.TimeoutException
- To notify userName of timeout.- See Also:
-
createRemoteDirectory
public static void createRemoteDirectory(WindowsRemoteExecutor windowsRemoteExecutor, String remotePath, long timeout) throws WindowsRemoteException, TimeoutException Create the remote directory.- Parameters:
windowsRemoteExecutor
- WindowsRemoteExecutor instance. (mandatory)remotePath
- The remote path to createtimeout
- Timeout in milliseconds- Throws:
WindowsRemoteException
- For any problem encountered.TimeoutException
- To notify userName of timeout.
-
getRemotePath
Get the remote path -
getWindowsRemoteExecutor
Get the WindowsRemoteExecutor instance