code: public void createAsset(String path, byte[] content) throws ServiceException {
          int lastSlash = path.lastIndexOf('/');
          File assetFile = new File(assetRoot + "/" + path.substring(0,  lastSlash).replace('.', '/') + path.substring(lastSlash));
          try {
              FileHelper.writeToFile(new ByteArrayInputStream(content), assetFile);
              AssetRevision rev = new AssetRevision();
              rev.setVersion(1);
              rev.setModDate(new Date());
              getVersionControl().setRevision(assetFile, rev);
          }
          catch (Exception ex) {
              throw new ServiceException(ServiceException.INTERNAL_ERROR, ex.getMessage());
          }
      }
docs: Create a new asset (version 1) on the file system.