code: void copyToLocal(String[]argv, int pos) throws IOException {
      CommandFormat cf = new CommandFormat("copyToLocal", 2,2,"crc","ignoreCrc");
      
      String srcstr = null;
      String dststr = null;
      try {
        List<String> parameters = cf.parse(argv, pos);
        srcstr = parameters.get(0);
        dststr = parameters.get(1);
      }
      catch(IllegalArgumentException iae) {
        System.err.println("Usage: java FreightStreamer " + GET_SHORT_USAGE);
        throw iae;
      }
      boolean copyCrc = cf.getOpt("crc");
      final boolean verifyChecksum = !cf.getOpt("ignoreCrc");
  
      if (dststr.equals("-")) {
        if (copyCrc) {
          System.err.println("-crc option is not valid when destination is stdout.");
        }
        cat(srcstr, verifyChecksum);
      } else {
        File dst = new File(dststr);      
        Path srcpath = new Path(srcstr);
        FileSystem srcFS = getSrcFileSystem(srcpath, verifyChecksum);
        if (copyCrc && !(srcFS instanceof ChecksumFileSystem)) {
          System.err.println("-crc option is not valid when source file system " +
              "does not have crc files. Automatically turn the option off.");
          copyCrc = false;
        }
        FileStatus[] srcs = srcFS.globStatus(srcpath);
        boolean dstIsDir = dst.isDirectory(); 
        if (srcs.length > 1 && !dstIsDir) {
          throw new IOException("When copying multiple files, "
                                + "destination should be a directory.");
        }
        for (FileStatus status : srcs) {
          Path p = status.getPath();
          File f = dstIsDir? new File(dst, p.getName()): dst;
          copyToLocal(srcFS, p, f, copyCrc);
        }
      }
    }
docs: Obtain the indicated files that match the file pattern <i>srcf</i>
  and copy them to the local name. srcf is kept.
  When copying multiple files, the destination must be a directory.
  Otherwise, IOException is thrown.
  @param argv: arguments
  @param pos: Ignore everything before argv[pos]
  @exception: IOException
  @see org.apache.hadoop.fs.FileSystem.globStatus