public void dirSerach(){if(REC){AddToHistory(Path);}
((DefaultTreeModel)tree.getModel()).setRoot(null);
DefaultMutableTreeNode root=new DefaultMutableTreeNode("Root");
if(Path==""){File[] roots=File.listRoots();for(int i=0;i<roots.length;i++)
{DefaultMutableTreeNode temp=new DefaultMutableTreeNode(roots[i]);
temp.add(new DefaultMutableTreeNode(""));
root.add(temp);}}else{File folder=new File(Path);
File[] list=folder.listFiles();for(int i=0;i<list.length;i++)
{if(list[i].isFile()){root.add(new DefaultMutableTreeNode(fix(list[i].toString())));}
else if(list[i].isDirectory()){DefaultMutableTreeNode temp=new DefaultMutableTreeNode(fix(list[i].toString()));
temp.add(new DefaultMutableTreeNode(""));root.add(temp);}}}((DefaultTreeModel)tree.getModel()).setRoot(root);}