/** * Returns an enumerable collection of file and directory items for the directory. * * @return An enumerable collection of {@link ListFileItem} objects that represent the file and directory items in * this directory. */ @DoesServiceRequest public Iterable<ListFileItem> listFilesAndDirectories() { return this.listFilesAndDirectories(null /* prefix */, null /* options */, null /* opContext */); }
if (doCloudFileDirectorySetup(this.share)) { CloudFileDirectory topDir1 = this.share.getRootDirectoryReference().getDirectoryReference("TopDir1"); Iterable<ListFileItem> list1 = topDir1.listFilesAndDirectories(); assertTrue(list1.iterator().hasNext()); ArrayList<ListFileItem> simpleList1 = new ArrayList<ListFileItem>(); CloudFileDirectory midDir2 = (CloudFileDirectory) item13; Iterable<ListFileItem> list2 = midDir2.listFilesAndDirectories();
Iterable<ListFileItem> list = topDir1.listFilesAndDirectories("file", null, null); ArrayList<ListFileItem> simpleList = new ArrayList<ListFileItem>(); for (ListFileItem i : list) { assertEquals("File1", ((CloudFile) item).getName()); list = topDir1.listFilesAndDirectories("mid", null, null); simpleList = new ArrayList<ListFileItem>(); for (ListFileItem i : list) {
/** * Returns an enumerable collection of file and directory items for the directory. * * @return An enumerable collection of {@link ListFileItem} objects that represent the file and directory items in * this directory. */ @DoesServiceRequest public Iterable<ListFileItem> listFilesAndDirectories() { return this.listFilesAndDirectories(null /* prefix */, null /* options */, null /* opContext */); }
/** * Returns an enumerable collection of file and directory items for the directory. * * @param options * A {@link FileRequestOptions} object that specifies any additional options for the request. Specifying * <code>null</code> will use the default request options from the associated service client ( * {@link CloudFileClient}). * @param opContext * An {@link OperationContext} object that represents the context for the current operation. This object * is used to track requests to the storage service, and to provide additional runtime information about * the operation. * * @return An enumerable collection of {@link ListFileItem} objects that represent the file and directory items in * this directory. */ @DoesServiceRequest public Iterable<ListFileItem> listFilesAndDirectories(FileRequestOptions options, OperationContext opContext) { return listFilesAndDirectories(null /* prefix */, options, opContext); }
/** * Returns an enumerable collection of file and directory items for the directory. * * @param options * A {@link FileRequestOptions} object that specifies any additional options for the request. Specifying * <code>null</code> will use the default request options from the associated service client ( * {@link CloudFileClient}). * @param opContext * An {@link OperationContext} object that represents the context for the current operation. This object * is used to track requests to the storage service, and to provide additional runtime information about * the operation. * * @return An enumerable collection of {@link ListFileItem} objects that represent the file and directory items in * this directory. * * @throws StorageException * If a storage service error occurred. * @throws URISyntaxException * If the resource URI is invalid. */ @DoesServiceRequest public Iterable<ListFileItem> listFilesAndDirectories(FileRequestOptions options, OperationContext opContext) { return listFilesAndDirectories(null /* prefix */, options, opContext); }
for (ListFileItem listedFile : share.getRootDirectoryReference().listFilesAndDirectories()); for (ListFileItem listedFile : share.getRootDirectoryReference().listFilesAndDirectories()); fail(); for (ListFileItem listedFile : share.getRootDirectoryReference().listFilesAndDirectories()); for (ListFileItem listedFile : share.getRootDirectoryReference().listFilesAndDirectories()); fail();
CloudFileShare snapshotRef = client.getShareReference(snapshot.name, snapshot.snapshotID); Iterable<ListFileItem> listResult = snapshotRef.getRootDirectoryReference().listFilesAndDirectories(); int count = 0; for (ListFileItem listFileItem : listResult) { listResult = snapshotRef.getRootDirectoryReference().getDirectoryReference("mydir").listFilesAndDirectories(); for (ListFileItem listFileItem : listResult) { if (listFileItem instanceof CloudFileDirectory) {
Iterator<ListFileItem> iter = rootDirectory.listFilesAndDirectories().iterator(); CloudFile file4 = null; if (iter.hasNext()) {