@Test @DisplayName("A File Manager can get the created user") void getUserDir() { try { Assertions.assertEquals(FileManagerTest.USER_FOLDER, Paths.get(FileManager.getUserDir(FileManagerTest.USER_FOLDER)) .getFileName() .toString()); } catch (FileNotFoundException e) { e.getMessage(); } }
public static String getUserDir(final String name) throws FileNotFoundException { final String userFolder = FileManager.libDir + OsUtils.getSeparator() + LibPaths.USER.getDirName() + OsUtils.getSeparator() + name + OsUtils.getSeparator(); if (!FileManager.checkIfFolderExists(userFolder)) { throw new FileNotFoundException(); } else { return userFolder; } }
FileManager { public static String getUserDir(final String name) throws FileNotFoundException { final String userFolder = FileManager.libDir + OsUtils.getSeparator() + LibPaths.USER.getDirName() + OsUtils.getSeparator() + name + OsUtils.getSeparator(); if (!FileManager.checkIfFolderExists(userFolder)) { throw new FileNotFoundException(); } else { return userFolder; } } }
FileManager { public static String getUserDir(final String name) throws FileNotFoundException { final String userFolder = FileManager.libDir + OsUtils.getSeparator() + LibPaths.USER.getDirName() + OsUtils.getSeparator() + name + OsUtils.getSeparator(); if (!FileManager.checkIfFolderExists(userFolder)) { throw new FileNotFoundException(); } else { return userFolder; } } private  FileManager(); }
FileManager { public static String getUserDir(final String name) throws FileNotFoundException { final String userFolder = FileManager.libDir + OsUtils.getSeparator() + LibPaths.USER.getDirName() + OsUtils.getSeparator() + name + OsUtils.getSeparator(); if (!FileManager.checkIfFolderExists(userFolder)) { throw new FileNotFoundException(); } else { return userFolder; } } private  FileManager(); static void createFrameworkDirectory(); static boolean createLibSubFolder(final String folder); static boolean createUserFolder(final String folder); static void deleteUserFolder(final String folder); static void createKinectNativeFolderLib(); static List<String> getAllUserFolder(); static String getUserDir(final String name); }
FileManager { public static String getUserDir(final String name) throws FileNotFoundException { final String userFolder = FileManager.libDir + OsUtils.getSeparator() + LibPaths.USER.getDirName() + OsUtils.getSeparator() + name + OsUtils.getSeparator(); if (!FileManager.checkIfFolderExists(userFolder)) { throw new FileNotFoundException(); } else { return userFolder; } } private  FileManager(); static void createFrameworkDirectory(); static boolean createLibSubFolder(final String folder); static boolean createUserFolder(final String folder); static void deleteUserFolder(final String folder); static void createKinectNativeFolderLib(); static List<String> getAllUserFolder(); static String getUserDir(final String name);  }