/** * 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.FORCE_CLOSE_INPUT} is cleared and * {@code FsSyncOption.FORCE_CLOSE_OUTPUT} is set or 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_INPUT} or * {@code FsSyncOption.FORCE_CLOSE_OUTPUT} is set and an unclosed * archive entry stream gets forcibly closed. * @throws FsSyncException if any error conditions apply. */ @SuppressWarnings("deprecation") @ExpertFeature(THE_PRESENCE_OR_ABSENCE_OF_SOME_OPTIONS_MAY_YIELD_UNWANTED_SIDE_EFFECTS) public static void sync(FsMountPoint tree, BitField<FsSyncOption> options) throws FsSyncException { new FsFilteringManager(TConfig.get().getFsManager(), tree) .sync(options); } }
@Override protected FsManager newManager(Type type) { return new FsFilteringManager( new FsDefaultManager(type), FsMountPoint.create(URI.create("file:/"))); }
set.add(FsMountPoint.create(URI.create(param))); final FsManager filter = new FsFilteringManager( manager, FsMountPoint.create(URI.create(params[0][0]))); assertThat(filter.getSize(), is(params[2].length));