Skip to content

Conversation

@jean-philippe-martin
Copy link

@jean-philippe-martin jean-philippe-martin commented Feb 17, 2017

(even though we normally don't allow operations on folders
since they are not represented). This helps with NIO-using code
that must also work with filesystems that do represent folders.

Also add a test for Files.WalkFileTree.

This should help with issue #1519

(even though we normally don't allow operations on folders
since they are not represented). This helps with NIO-using code
that must also work with filesystems that *do* represent folders.
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 17, 2017
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.001%) to 81.123% when pulling 7602426 on jean-philippe-martin:jp_delete_empty_folder into 68ce84d on GoogleCloudPlatform:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.007%) to 81.131% when pulling 2a218c2 on jean-philippe-martin:jp_delete_empty_folder into 68ce84d on GoogleCloudPlatform:master.

@jean-philippe-martin
Copy link
Author

The holdup on this PR is blocking gatk#2441. Would it be possible to please have someone look at it? @garrettjonesgoogle maybe?

}
}

@Test(expected = CloudStoragePseudoDirectoryException.class)

This comment was marked as spam.

This comment was marked as spam.

* @param directory the directory to delete
* @throws IOException
*/
static private void deleteRecursive(Path directory) throws IOException {

This comment was marked as spam.

This comment was marked as spam.

assertThat(Files.exists(fs.getPath("playwrights/French/Corneille"))).isFalse();
assertThat(Files.exists(fs.getPath("Racine"))).isTrue();
Files.deleteIfExists(fs.getPath("Racine"));
}

This comment was marked as spam.

This comment was marked as spam.

* @param directory the directory to delete
* @throws IOException
*/
static private void deleteRecursive(Path directory) throws IOException {

This comment was marked as spam.

This comment was marked as spam.

// We can't check Files.exists on a folder (since GCS fakes folders),
Path dir = fs.getPath("dir/");
Files.deleteIfExists(dir);
}

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

assertThat(Files.exists(fs.getPath("dir/dir3/cloud"))).isFalse();
assertThat(Files.exists(fs.getPath("atroot"))).isTrue();
}
}

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@jean-philippe-martin
Copy link
Author

Thank you very much for taking a look! I'm pushing a new version that should address everything.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 05b8bee on jean-philippe-martin:jp_delete_empty_folder into ** on GoogleCloudPlatform:master**.

@garrettjonesgoogle garrettjonesgoogle merged commit 56d55a5 into googleapis:master Mar 10, 2017
@jean-philippe-martin
Copy link
Author

Thank you!

@jean-philippe-martin jean-philippe-martin deleted the jp_delete_empty_folder branch March 10, 2017 23:31
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 6900323 on jean-philippe-martin:jp_delete_empty_folder into ** on GoogleCloudPlatform:master**.

meltsufin pushed a commit that referenced this pull request Dec 22, 2025
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants