/** Returns a controller filter for the given prefix mount point. */ public static FsControllerFilter forPrefix(FsMountPoint prefix) { return new FsControllerFilter(FsModelFilter.forPrefix(prefix)); }
@Override public void sync() throws FsSyncWarningException, FsSyncException { new FsSync() .filter(FsControllerFilter.forPrefix(model.getMountPoint())) .run(); } }
/** * Commits all pending changes for all (nested) archive files within the * given (virtual) directory {@code tree} to their respective parent file * system with respect to the given options. * * @param tree a file or directory in the (virtual) file system space. * @param options a bit field of options for the synchronization operation. * @throws IllegalArgumentException if the combination of synchronization * options is illegal, e.g. if {@code FsSyncOption.ABORT_CHANGES} * is set. * @throws FsSyncWarningException if <em>only</em> warning conditions * apply. * This implies that the respective parent file system has been * synchronized with constraints, e.g. if * {@code FsSyncOption.FORCE_CLOSE_IO} is set and an unclosed * archive entry stream gets forcibly closed. * @throws FsSyncException if any error conditions apply. */ @ExpertFeature(THE_PRESENCE_OR_ABSENCE_OF_SOME_OPTIONS_MAY_YIELD_UNWANTED_SIDE_EFFECTS) public static void sync(FsMountPoint tree, BitField<FsSyncOption> options) throws FsSyncWarningException, FsSyncException { new FsSync() .manager(TConfig.current().getManager()) .filter(FsControllerFilter.forPrefix(tree)) .options(options) .run(); }