code: private static FileNode which(World world, String cmd) throws IOException {
          String path;
          FileNode file;
  
          path = System.getenv("PATH");
          if (path != null) {
              for (String entry : Separator.on(':').trim().split(path)) {
                  file = world.file(entry).join(cmd);
                  if (file.isFile()) {
                      while (file.isLink()) {
                          file = (FileNode) file.resolveLink();
                      }
                      return file;
                  }
              }
          }
          return null;
      }
docs: TODO: sushi