code: public static File saveFile(String rfsName, byte[] content) throws IOException {
  
          File f = new File(rfsName);
          File p = f.getParentFile();
          if (!p.exists()) {
              // create parent folders
              p.mkdirs();
          }
          // write file contents
          FileOutputStream fs = new FileOutputStream(f);
          fs.write(content);
          fs.close();
          return f;
      }
docs: Saves the given file content to a RFS file of the given name (full path).<p>
  
  If the required parent folders do not exists, they are also created.<p>
  
  @param rfsName the RFS name of the file to save the content in
  @param content the content of the file to save
  
  @return a reference to the File that was saved
  
  @throws IOException in case of disk access errors