/** * Returns a reference to a virtual blob directory beneath this directory. * * @param directoryName * A <code>String</code> that represents the name of the virtual subdirectory. * * @return A <code>CloudBlobDirectory</code> object that represents a virtual blob directory beneath this directory. * * @throws URISyntaxException * If the resource URI is invalid. */ public CloudBlobDirectory getDirectoryReference(String directoryName) throws URISyntaxException { Utility.assertNotNullOrEmpty("directoryName", directoryName); if (!directoryName.endsWith(this.blobServiceClient.getDirectoryDelimiter())) { directoryName = directoryName.concat(this.blobServiceClient.getDirectoryDelimiter()); } final String subDirName = this.getPrefix().concat(directoryName); final StorageUri address = PathUtility.appendPathToUri(this.storageUri, directoryName, this.blobServiceClient.getDirectoryDelimiter()); return new CloudBlobDirectory(address, subDirName, this.blobServiceClient, this.container, this); }
/** * Returns a reference to a {@link CloudBlobDirectory} object that represents a virtual blob directory within this * container. * * @param directoryName * A <code>String</code> that represents the name of the virtual blob directory. If the root directory * (the directory representing the container itself) is desired, use an empty string. * @return A {@link CloudBlobDirectory} that represents a virtual blob directory within this container. * @throws URISyntaxException * If the resource URI is invalid. */ public CloudBlobDirectory getDirectoryReference(String directoryName) throws URISyntaxException { Utility.assertNotNull("directoryName", directoryName); // if the directory name does not end in the delimiter, add the delimiter if (!directoryName.isEmpty() && !directoryName.endsWith(this.blobServiceClient.getDirectoryDelimiter())) { directoryName = directoryName.concat(this.blobServiceClient.getDirectoryDelimiter()); } final StorageUri address = PathUtility.appendPathToUri(this.storageUri, directoryName); return new CloudBlobDirectory(address, directoryName, this.blobServiceClient, this); }
/** * Returns a reference to a virtual blob directory beneath this directory. * * @param directoryName * A <code>String</code> that represents the name of the virtual subdirectory. * * @return A <code>CloudBlobDirectory</code> object that represents a virtual blob directory beneath this directory. * * @throws URISyntaxException * If the resource URI is invalid. */ public CloudBlobDirectory getDirectoryReference(String directoryName) throws URISyntaxException { Utility.assertNotNullOrEmpty("directoryName", directoryName); if (!directoryName.endsWith(this.blobServiceClient.getDirectoryDelimiter())) { directoryName = directoryName.concat(this.blobServiceClient.getDirectoryDelimiter()); } final String subDirName = this.getPrefix().concat(directoryName); final StorageUri address = PathUtility.appendPathToUri(this.storageUri, directoryName, this.blobServiceClient.getDirectoryDelimiter()); return new CloudBlobDirectory(address, subDirName, this.blobServiceClient, this.container, this); }
/** * Returns a reference to a {@link CloudBlobDirectory} object that represents a virtual blob directory within this * container. * * @param directoryName * A <code>String</code> that represents the name of the virtual blob directory. If the root directory * (the directory representing the container itself) is desired, use an empty string. * @return A {@link CloudBlobDirectory} that represents a virtual blob directory within this container. * @throws URISyntaxException * If the resource URI is invalid. */ public CloudBlobDirectory getDirectoryReference(String directoryName) throws URISyntaxException { Utility.assertNotNull("directoryName", directoryName); // if the directory name does not end in the delimiter, add the delimiter if (!directoryName.isEmpty() && !directoryName.endsWith(this.blobServiceClient.getDirectoryDelimiter())) { directoryName = directoryName.concat(this.blobServiceClient.getDirectoryDelimiter()); } final StorageUri address = PathUtility.appendPathToUri(this.storageUri, directoryName); return new CloudBlobDirectory(address, directoryName, this.blobServiceClient, this); }
/** * Returns the parent directory of this directory. * * @return A {@link CloudBlobDirectory} object that represents the parent of this directory. * * @throws StorageException * If a storage service error occurred. * @throws URISyntaxException * If the resource URI is invalid. */ @Override public CloudBlobDirectory getParent() throws URISyntaxException, StorageException { if (this.parent == null) { final String parentName = CloudBlob.getParentNameFromURI(this.getStorageUri(), this.blobServiceClient.getDirectoryDelimiter(), this.getContainer()); if (parentName != null) { StorageUri parentURI = PathUtility.appendPathToUri(this.container.getStorageUri(), parentName); this.parent = new CloudBlobDirectory(parentURI, parentName, this.blobServiceClient, this.getContainer()); } } return this.parent; }
/** * Returns the blob item's parent. * * @return A {@link CloudBlobDirectory} object that represents the parent directory for the blob. * * @throws StorageException * If a storage service error occurred. * @throws URISyntaxException * If the resource URI is invalid. */ @Override public final CloudBlobDirectory getParent() throws URISyntaxException, StorageException { if (this.parent == null) { final String parentName = getParentNameFromURI(this.getStorageUri(), this.blobServiceClient.getDirectoryDelimiter(), this.getContainer()); if (parentName != null) { StorageUri parentURI = PathUtility.appendPathToUri(this.container.getStorageUri(), parentName); this.parent = new CloudBlobDirectory(parentURI, parentName, this.blobServiceClient, this.getContainer()); } } return this.parent; }
Utility.assertNotNull("options", options); final String delimiter = useFlatBlobListing ? null : this.blobServiceClient.getDirectoryDelimiter();
CloudBlobClient client = getCloudBlobClient(connectionString); String containerName = blobDirectory.getContainerName(); String delimiter = client.getDirectoryDelimiter();
Utility.assertNotNull("options", options); final String delimiter = useFlatBlobListing ? null : this.blobServiceClient.getDirectoryDelimiter();
/** * Returns the parent directory of this directory. * * @return A {@link CloudBlobDirectory} object that represents the parent of this directory. * * @throws StorageException * If a storage service error occurred. * @throws URISyntaxException * If the resource URI is invalid. */ @Override public CloudBlobDirectory getParent() throws URISyntaxException, StorageException { if (this.parent == null) { final String parentName = CloudBlob.getParentNameFromURI(this.getStorageUri(), this.blobServiceClient.getDirectoryDelimiter(), this.getContainer()); if (parentName != null) { StorageUri parentURI = PathUtility.appendPathToUri(this.container.getStorageUri(), parentName); this.parent = new CloudBlobDirectory(parentURI, parentName, this.blobServiceClient, this.getContainer()); } } return this.parent; }
/** * Returns the blob item's parent. * * @return A {@link CloudBlobDirectory} object that represents the parent directory for the blob. * * @throws StorageException * If a storage service error occurred. * @throws URISyntaxException * If the resource URI is invalid. */ @Override public final CloudBlobDirectory getParent() throws URISyntaxException, StorageException { if (this.parent == null) { final String parentName = getParentNameFromURI(this.getStorageUri(), this.blobServiceClient.getDirectoryDelimiter(), this.getContainer()); if (parentName != null) { StorageUri parentURI = PathUtility.appendPathToUri(this.container.getStorageUri(), parentName); this.parent = new CloudBlobDirectory(parentURI, parentName, this.blobServiceClient, this.getContainer()); } } return this.parent; }