code: public static boolean isDirectoryPlaceholder(String key, ObjectMetadata objectMetadata)
    {
      // Recognize "standard" directory place-holder indications used by
      // Amazon's AWS Console and Panic's Transmit.
      if (key.endsWith("/") && objectMetadata.getContentLength() == 0) {
        return true;
      }
      // Recognize s3sync.rb directory placeholders by MD5/ETag value.
      if ("d66759af42f282e1ba19144df2d405d0".equals(objectMetadata.getETag())) {
        return true;
      }
      // Recognize place-holder objects created by the Google Storage console
      // or S3 Organizer Firefox extension.
      if (key.endsWith("_$folder$") && objectMetadata.getContentLength() == 0) {
        return true;
      }
  
      // We don't use JetS3t APIs anymore, but the below check is still needed for backward compatibility.
  
      // Recognize legacy JetS3t directory place-holder objects, only gives
      // accurate results if an object's metadata is populated.
      if (objectMetadata.getContentLength() == 0 && MIMETYPE_JETS3T_DIRECTORY.equals(objectMetadata.getContentType())) {
        return true;
      }
      return false;
    }
docs: Copied from org.jets3t.service.model.StorageObject.isDirectoryPlaceholder()