@Test @DisplayName("A File Manager can get all the users folders") void getAllUserFolder() { Assertions.assertDoesNotThrow(FileManager::getAllUserFolder); }
public static List<String> getAllUserFolder() throws IOException { try (Stream<Path> paths = Files.walk( Paths.get(FileManager.libDir + OsUtils.getSeparator() + LibPaths.USER.getDirName()), 1)) { return paths.map(p -> p.getFileName().toString()) .filter(t -> !t.equals(LibPaths.USER.getDirName())) .collect(Collectors.toList()); } }
FileManager { public static List<String> getAllUserFolder() throws IOException { try (Stream<Path> paths = Files.walk( Paths.get(FileManager.libDir + OsUtils.getSeparator() + LibPaths.USER.getDirName()), 1)) { return paths.map(p -> p.getFileName().toString()) .filter(t -> !t.equals(LibPaths.USER.getDirName())) .collect(Collectors.toList()); } } }
FileManager { public static List<String> getAllUserFolder() throws IOException { try (Stream<Path> paths = Files.walk( Paths.get(FileManager.libDir + OsUtils.getSeparator() + LibPaths.USER.getDirName()), 1)) { return paths.map(p -> p.getFileName().toString()) .filter(t -> !t.equals(LibPaths.USER.getDirName())) .collect(Collectors.toList()); } } private  FileManager(); }
FileManager { public static List<String> getAllUserFolder() throws IOException { try (Stream<Path> paths = Files.walk( Paths.get(FileManager.libDir + OsUtils.getSeparator() + LibPaths.USER.getDirName()), 1)) { return paths.map(p -> p.getFileName().toString()) .filter(t -> !t.equals(LibPaths.USER.getDirName())) .collect(Collectors.toList()); } } 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 List<String> getAllUserFolder() throws IOException { try (Stream<Path> paths = Files.walk( Paths.get(FileManager.libDir + OsUtils.getSeparator() + LibPaths.USER.getDirName()), 1)) { return paths.map(p -> p.getFileName().toString()) .filter(t -> !t.equals(LibPaths.USER.getDirName())) .collect(Collectors.toList()); } } 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);  }