Class Directory
java.lang.Object
it.unimi.di.prog2.temisvolti.filesystem.Entry
it.unimi.di.prog2.temisvolti.filesystem.Directory
-
Field Details
-
entries
-
-
Constructor Details
-
Directory
Costruisce una directory vuota dato il suo nome- Parameters:
name
- il nome.- Throws:
IllegalArgumentException
- se il nome ènull
o vuoto.
-
-
Method Details
-
find
Restituisce l'entry dato il suo nome se presente (altrimenti restituiscenull
).- Parameters:
name
- il nome dell'entry.- Returns:
- l'entry di dato nome (o
null
se nessuna entry ha il nome dato). - Throws:
NullPointerException
- se ilname
ènull
.
-
add
Aggiunge una entry.- Parameters:
entry
- l'entry da aggiungere.- Throws:
NullPointerException
- se l'entry ènull
.FileAlreadyExistsException
- se la directory contiene una entry omonima.
-
isDir
-
size
-
toString
-
iterator
-