java.lang.Object
com.flexstor.common.io.xfile.webnfs.WebNfsDelete
- All Implemented Interfaces:
- com.flexstor.common.io.xfile.XFileAccessorI, com.flexstor.common.io.xfile.XFileDeleteI
- public class WebNfsDelete
- extends java.lang.Object
- implements com.flexstor.common.io.xfile.XFileDeleteI
WebNfsDelete uses WebNFS to delete files from the filesystem
This Class assumes that all paths will be preceded by nfs:// if on another
filesystem. It will make no attempt at determining if the path
is local or on another server.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IDENTIFIER
public static final java.lang.String IDENTIFIER
- See Also:
- Constant Field Values
sThisService
private java.lang.String sThisService
xfeaNFS
private XFileExtensionAccessor xfeaNFS
sHost
private java.lang.String sHost
sUser
private java.lang.String sUser
sPassword
private java.lang.String sPassword
bDoLogin
private boolean bDoLogin
bConnected
private boolean bConnected
WebNfsDelete
public WebNfsDelete()
connect
public boolean connect(java.lang.String sHost,
java.lang.String sUser,
java.lang.String sPassword)
- Connects to host using the credentials specified.
Returns true if connection was sucessful; false otherwise.
- Specified by:
connect in interface com.flexstor.common.io.xfile.XFileAccessorI
connect
private boolean connect(java.lang.String sPath)
disconnect
public void disconnect()
- Disconnects from host.
- Specified by:
disconnect in interface com.flexstor.common.io.xfile.XFileAccessorI
deleteFile
public boolean deleteFile(java.lang.String sSource)
- Description copied from interface:
com.flexstor.common.io.xfile.XFileDeleteI
- Deletes the file specified. If the file is the only one left, its directory will also be
removed.
- Specified by:
deleteFile in interface com.flexstor.common.io.xfile.XFileDeleteI
deleteFile
public boolean deleteFile(java.lang.String sSource,
boolean bRemoveParentIfEmpty)
- Description copied from interface:
com.flexstor.common.io.xfile.XFileDeleteI
- Deletes the file specified. If the second argument is true, it will remove the directory if it
is empty; if false, it will not remove the directory even if it is empty.
- Specified by:
deleteFile in interface com.flexstor.common.io.xfile.XFileDeleteI
deleteParent
private void deleteParent(java.lang.String sParentDir)
deleteDirectory
public boolean deleteDirectory(java.lang.String sDir)
- Description copied from interface:
com.flexstor.common.io.xfile.XFileDeleteI
- Deletes the directory specified. This operation will delete any files and subdirectories.
- Specified by:
deleteDirectory in interface com.flexstor.common.io.xfile.XFileDeleteI
deleteDirectory
public boolean deleteDirectory(java.lang.String sDir,
boolean bDeleteContent)
- Description copied from interface:
com.flexstor.common.io.xfile.XFileDeleteI
- Deletes the directory specified. If the second argument is false, it will remove the directory
only if it is empty; if true, it will delete the directory regardless of its content.
- Specified by:
deleteDirectory in interface com.flexstor.common.io.xfile.XFileDeleteI