Class MarkersGetDirectoryStrategy
java.lang.Object
org.jclouds.blobstore.strategy.internal.MarkersGetDirectoryStrategy
- All Implemented Interfaces:
GetDirectoryStrategy
Key-value implementations of BlobStore, such as S3, do not have directories. In following the
rackspace cloud files project, we use an empty object '#{dirpath}' with content type set to
'application/directory'.
To interoperate with other S3 tools, we accept the following ways to tell if the directory
exists:
- an object named '#{dirpath}_$folder$' or '#{dirpath}/' denoting a directory marker
- an object with content type set to 'application/directory' denoting a directory marker
- if there exists any objects with the prefix "#{dirpath}/", then the directory is said to exist
- if both a file with the name of a directory and a marker for that directory exists, then the *file masks the directory*, and the directory is never returned.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMarkersGetDirectoryStrategy
(BlobStore connection, ResourceMetadataToRelativePathResourceMetadata resource2Directory) -
Method Summary
Modifier and TypeMethodDescription
-
Field Details
-
resource2Directory
-
-
Constructor Details
-
MarkersGetDirectoryStrategy
@Inject public MarkersGetDirectoryStrategy(BlobStore connection, ResourceMetadataToRelativePathResourceMetadata resource2Directory)
-
-
Method Details
-
execute
- Specified by:
execute
in interfaceGetDirectoryStrategy
-