DFSS
Class Datamanager

java.lang.Object
  extended byDFSS.Datamanager
All Implemented Interfaces:
java.io.Serializable

public class Datamanager
extends java.lang.Object
implements java.io.Serializable

Author:
Dario Agostinone Classe che gestisce la memorizzazione relativa alle cartelle del file system tramite il comando getDirectory("ALL") è possibile accedere all'intero contenuto del file system
See Also:
Serialized Form

Constructor Summary
Datamanager(java.lang.String home)
           
 
Method Summary
 void addFile(java.lang.String DirectoryPath, java.lang.String Filename, java.lang.String path)
          aggiunge un file alla cartella DirectoryPath , la stringa path rappresenta l'identificatore univoco di un file utilizzato nel prototipo
 boolean ExistsDir(java.lang.String path)
          restituisce true se la cartella caratterizzata dal path = "path" è presente nel file system
 boolean ExistsFile(java.lang.String path, java.lang.String name)
          Resituisce true se il file "/path/name" è presente nel file system
 Directory getDirectory(java.lang.String path)
           
 java.lang.String getIdFile(java.lang.String dir, java.lang.String file)
           
 void removeDirectory(java.lang.String path)
          Rimuove la cartella caratterizzata dal path="path"
 void rimuoviFile(java.lang.String Directory, java.lang.String file)
          Rimuove un file dalla cartella Directory
 void saveDirectory(Directory in)
          Effettua il salvataggio della cartella passata in ingresso
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Datamanager

public Datamanager(java.lang.String home)
Method Detail

ExistsDir

public boolean ExistsDir(java.lang.String path)
restituisce true se la cartella caratterizzata dal path = "path" è presente nel file system


ExistsFile

public boolean ExistsFile(java.lang.String path,
                          java.lang.String name)
Resituisce true se il file "/path/name" è presente nel file system


getDirectory

public Directory getDirectory(java.lang.String path)
                       throws java.lang.Exception
Throws:
java.lang.Exception

saveDirectory

public void saveDirectory(Directory in)
                   throws java.lang.Exception
Effettua il salvataggio della cartella passata in ingresso

Throws:
java.lang.Exception

removeDirectory

public void removeDirectory(java.lang.String path)
Rimuove la cartella caratterizzata dal path="path"


addFile

public void addFile(java.lang.String DirectoryPath,
                    java.lang.String Filename,
                    java.lang.String path)
             throws java.lang.Exception
aggiunge un file alla cartella DirectoryPath , la stringa path rappresenta l'identificatore univoco di un file utilizzato nel prototipo

Throws:
java.lang.Exception

getIdFile

public java.lang.String getIdFile(java.lang.String dir,
                                  java.lang.String file)
                           throws java.lang.Exception
Throws:
java.lang.Exception

rimuoviFile

public void rimuoviFile(java.lang.String Directory,
                        java.lang.String file)
                 throws java.lang.Exception
Rimuove un file dalla cartella Directory

Throws:
java.lang.Exception