protected FsAbstractModel( final FsMountPoint mountPoint, final @CheckForNull FsModel parent) { if (!Objects.equals(mountPoint.getParent(), (null == parent ? null : parent.getMountPoint()))) throw new IllegalArgumentException("Parent/Member mismatch!"); this.mountPoint = mountPoint; this.parent = parent; }
/** * {@inheritDoc} * <p> * The implementation in the class {@link FsDriver} forwards the call to * the given file system manager. */ @Override public final FsModel newModel( FsManager context, FsMountPoint mountPoint, FsModel parent) { assert null == parent ? null == mountPoint.getParent() : parent.getMountPoint().equals(mountPoint.getParent()); return context.newModel(this, mountPoint, parent); }
/** * Returns {@code true} if and only if this {@code TPath} addresses an * entry located within an archive file. * Whether or not this is true solely depends on the * {@link TArchiveDetector} which was used to construct this {@code TPath} * - no file system tests are performed by this method! * * @return {@code true} if and only if this {@code TPath} addresses an * entry located within an archive file. * @see #isArchive */ public boolean isEntry() { final FsNodePath nodePath = getNodePath(); final boolean root = nodePath.getNodeName().isRoot(); final FsMountPoint parent = nodePath.getMountPoint().getParent(); return !root ? null != parent : null != parent && null != parent.getParent(); }
BitField<FsAccessOption> getAccessPreferences() { final BitField<FsAccessOption> preferences = TConfig.current().getAccessPreferences(); return null != getMountPoint().getParent() ? preferences : preferences.clear(CREATE_PARENTS); }
/** * Returns {@code true} if and only if this {@code TPath} addresses an * archive file. * Whether or not this is true solely depends on the * {@link TArchiveDetector} which was used to construct this {@code TPath} * - no file system tests are performed by this method! * * @return {@code true} if and only if this {@code TPath} addresses an * archive file. * @see #isEntry */ public boolean isArchive() { final FsNodePath nodePath = getNodePath(); final boolean root = nodePath.getNodeName().isRoot(); final FsMountPoint parent = nodePath.getMountPoint().getParent(); return root && null != parent; }
try (final TConfig c = open(configuration)) { final TPath p = new TPath(path); if (null == p.getMountPoint().getParent()) throw new UnsupportedOperationException("No prospective archive file detected."); // don't be greedy! return p.getFileSystem();
protected FsNode node() { final FsMountPoint mmp = model.getMountPoint(); final FsMountPoint pmp = mmp.getParent(); final FsMountPoint mp; final FsNodeName en;