File parent = rootPath.getParentFile();
while (parent != null) {
parentPaths.add(rootPath.getName());
rootPath = rootPath.getParentFile();
parent = rootPath.getParentFile();
}
File parent = rootPath.getParentFile();
while (parent != null) {
parentPaths.add(rootPath.getName());
rootPath = rootPath.getParentFile();
parent = rootPath.getParentFile();
}