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