When a filesystem blob does not have content metadata and when users
set jclouds.filesystem.auto-detect-content-type to tru, probe the file
type to return to clients. This is useful when using jclouds to serve
an existing filesystem.
Java on OS X does not support extended attributes, which the
filesystem blobstore uses to implement user metadata. This disable
the relevant test on OS X
when you bind a host volume into docker, java does not correctly
detect that and checks the xattr support on the root fs instead
of the host fs. The root fs often does not support xattr, so
the check would fail even if the target really does support xattr.
the fix is just try setting the xattrs anyway, and let them fail
if there really isn't xattrs support
This allows callers to read the content length during container
listing. Tested against: atmosonline, aws-s3, azureblob, filesystem,
and transient. Intentionally not implemented for legacy swift
provider.
make the filesystem blob store distinguish between a/ and a. a/
must be a directory blob with no content and only metadata
on listing, only directories with md5 attribute is considered a
blob and returned
All other blobstore providers allow this operation. Further this
matches the behavior of TransientStorageStrategy.deleteContainer.
This commit prevents a spurious error message from
deleteContainerOrWarnIfUnable after test suite completion.
This allows the filesystem blobstore to mimic real blobstores more
accurately. This also doubles the speed of getBlob by storing the
Content-MD5 header instead of recalculating it.
This matches how most blobstores operate: delete container is a single
operation, not a compound operation which recursively deletes blobs.
Azure is the only provider which allows deleting a non-empty
container.
Also remove bogus delete workaround. Previously unclosed
FileInputStream caused test failures on Windows which cannot delete
open files. Found with Kohsuke's file-leak-detector.
Callers should instead explicitly set contentMD5, usually with the
results from Guava Hashing.md5(). This narrows the API and removes a
strange IOException from callers. Further it removes a dangerous
rebuffering of arbitrarily-large non-repeatable Payloads.