We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 67e4c9d commit bf074b3Copy full SHA for bf074b3
[refs]
@@ -1,5 +1,5 @@
1
---
2
-refs/heads/master: 8f5cb92f89a48fd47b0eff6fa72aa2f0b18188b3
+refs/heads/master: d600601162d8a28b0a7e4eeaba81d0c2cee2e226
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
5
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
trunk/src/libstd/path.rs
@@ -508,6 +508,14 @@ impl WindowsPath {
508
}
509
510
511
+
512
+ /// Execute a function on p as well as all of its ancestors
513
+ pub fn each_parent(&self, f: &fn(&Path)) {
514
+ if !self.components.is_empty() {
515
+ f(self);
516
+ self.pop().each_parent(f);
517
+ }
518
519
520
521
impl ToStr for PosixPath {
0 commit comments