Exemplo n.º 1
0
 private CommandControllerImpl()
 {
     dataProvider        = DataPRoviderImpl.getInstance();
     directoryController = DirectoryControllerImpl.getInstance();
     fileController      = FileControllerImpl.getInstance();
     securityManager     = SecurityManagerImpl.getInstance();
     userManager         = UserManagerImpl.getInstance();
 }
Exemplo n.º 2
0
 public static UserManagerImpl getInstance()
 {
     if (instance == null)
     {
         instance = new UserManagerImpl(DataPRoviderImpl.getInstance(), SecurityManagerImpl.getInstance());
     }
     return(instance);
 }
Exemplo n.º 3
0
 public void createDirectory(string name)
 {
     if ((dataProvider.getCurrentDirectory() + '\\' + name).Equals(dataProvider.getCurrentDirectory() + '\\') || Directory.Exists(dataProvider.getCurrentDirectory() + '\\' + name))
     {
         throw new FileOrDirectoryOlreadyExistException();
     }
     if (!SecurityManagerImpl.getInstance().isDirNameCorrect(name))
     {
         throw new WrongFileOrDirectoryNameException();
     }
     Directory.CreateDirectory(dataProvider.getCurrentDirectory() + '\\' + name);
     //Directory.CreateDirectory(name);
 }