code: static DeploymentContent of(final Path content) {
          return new DeploymentContent() {
  
              @Override
              void addContentToOperation(final OperationBuilder builder, final ModelNode op) {
                  final ModelNode contentNode = op.get(CONTENT);
                  final ModelNode contentItem = contentNode.get(0);
                  // If the content points to a directory we are deploying exploded content
                  if (Files.isDirectory(content)) {
                      contentItem.get(PATH).set(content.toAbsolutePath().toString());
                      contentItem.get("archive").set(false);
                  } else {
                      // The index is 0 based so use the input stream count before adding the input stream
                      contentItem.get(ClientConstants.INPUT_STREAM_INDEX).set(builder.getInputStreamCount());
                      builder.addFileAsAttachment(content.toFile());
                  }
              }
  
              @Override
              String resolvedName() {
                  return content.getFileName().toString();
              }
  
              @Override
              public String toString() {
                  return String.format("%s(%s)", DeploymentContent.class.getName(), content);
              }
          };
      }
docs: Creates new deployment content based on a file system path.
  <p>
  The {@link #resolvedName()} will return the name of the file.
  </p>
  
  @param content the path to the content
  
  @return the deployment content