|
|
@ -8,7 +8,8 @@ import java.util.List;
|
|
|
|
public class DirectoryStructureToJson {
|
|
|
|
public class DirectoryStructureToJson {
|
|
|
|
|
|
|
|
|
|
|
|
public static Node getNode(File fileNode) throws IOException{
|
|
|
|
public static Node getNode(File fileNode) throws IOException{
|
|
|
|
if(fileNode.isDirectory()){
|
|
|
|
|
|
|
|
|
|
|
|
if(fileNode.isDirectory() || fileNode.getName().equals("files")){
|
|
|
|
return new Node(fileNode.getName(),"directory", getDirList(fileNode));
|
|
|
|
return new Node(fileNode.getName(),"directory", getDirList(fileNode));
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
return new Node(fileNode.getName(),"file",null);
|
|
|
|
return new Node(fileNode.getName(),"file",null);
|
|
|
|