Xesevi

Filesystem

Jul 6th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.29 KB | None | 0 0
  1.  
  2. public class FileSystem {
  3.  private Directory root;
  4.  public FileSystem(Directory d) {
  5.      root = d;
  6.  }
  7.  public void search(String name){
  8.      if (root==null)
  9.          return;
  10.      Elm e = root.search(name);
  11.      if (e==null)
  12.          System.out.println("no such file or directory");
  13.      else
  14.          e.show();
  15.  }
  16. }
Add Comment
Please, Sign In to add comment