public class DirectoryDelegate extends UnicastRemoteObject implements RemoteDirectory
FileDelegate
,
Serialized Formref
Constructor and Description |
---|
DirectoryDelegate(File dir,
DirectoryDelegate parent) |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroy this directory entry, deleting the file or sub-directory.
|
RemoteDirectory |
getContainingDirectory()
Gets the directory containing this directory entry.
|
Collection<RemoteDirectoryEntry> |
getContents() |
Date |
getModificationDate() |
String |
getName() |
RemoteFile |
makeEmptyFile(String name)
Creates an empty file in this directory.
|
RemoteDirectory |
makeSubdirectory(String name)
Creates a sub-directory of this directory.
|
clone, exportObject, exportObject, exportObject, unexportObject
getClientHost, getLog, setLog
public DirectoryDelegate(@Nonnull File dir, @Nonnull DirectoryDelegate parent) throws RemoteException
dir
- parent
- RemoteException
- If registration of the directory fails.public Collection<RemoteDirectoryEntry> getContents() throws RemoteException
getContents
in interface RemoteDirectory
RemoteException
- If anything goes wrong with the communication.public RemoteFile makeEmptyFile(String name) throws IOException
RemoteDirectory
makeEmptyFile
in interface RemoteDirectory
name
- The name of the file to create.RemoteException
- If anything goes wrong with the communication.IOException
- If anything goes wrong with creating the file.public RemoteDirectory makeSubdirectory(String name) throws IOException
RemoteDirectory
makeSubdirectory
in interface RemoteDirectory
name
- The name of the sub-directory.RemoteException
- If anything goes wrong with the communication.IOException
- If things go wrong with creating the subdirectory.public void destroy() throws IOException
RemoteDirectoryEntry
destroy
in interface RemoteDirectoryEntry
RemoteException
- If anything goes wrong with the communication.IOException
- If things go wrong when deleting the directory entry.public RemoteDirectory getContainingDirectory()
RemoteDirectoryEntry
getContainingDirectory
in interface RemoteDirectoryEntry
public String getName()
getName
in interface RemoteDirectoryEntry
public Date getModificationDate() throws RemoteException
getModificationDate
in interface RemoteDirectoryEntry
RemoteException
- If anything goes wrong with the communication.Copyright © 2015–2018 The Apache Software Foundation. All rights reserved.