code: private void addResource(final Path pathToFile, final URL resource) throws IOException {
  
          if (resource == null) {
              addFolder(pathToFile);
          } else {
              addEntry(pathToFile, resource);
          }
      }
docs: Adds a resource respectively it's content to the filesystem at the position specified by the pathToFile
  
  @param pathToFile
  the path to the file or folder to which the resource's content should be written
  @param resource
  the resource providing the content for the entry. If the resource is null, a folder will be created
  
  @throws IOException