private static void fsyncLineage ( final Path path ) throws IOException { Path cursor = path . toRealPath ( ) ; while ( cursor != null ) { fsync ( cursor ) ; cursor = cursor . getParent ( ) ; } }
Fsync a path and all parents all the way up to the fs root .