class S3ResourceId implements ResourceId {

  @Override
  public ResourceId getCurrentDirectory() {
    if (isDirectory()) {
      return this;
    }
    return fromComponents(getBucket(), key.substring(0, key.lastIndexOf('/') + 1));
  }

  private  S3ResourceId(
      String bucket, String key, @Nullable Long size, @Nullable Date lastModified);

}