/** Set whether the filesystem should be read only. * @param flag <code>true</code> if it should */ public void setReadOnly(boolean flag) { if (flag != readOnly) { readOnly = flag; firePropertyChange( PROP_READ_ONLY, (!flag) ? Boolean.TRUE : Boolean.FALSE, flag ? Boolean.TRUE : Boolean.FALSE ); } }
/** Set the root directory of the filesystem. * @param r file to set root to * @exception PropertyVetoException if the value if vetoed by someone else (usually * by the {@link org.openide.filesystems.Repository Repository}) * @exception IOException if the root does not exists or some other error occured */ public synchronized void setRootDirectory(File r) throws PropertyVetoException, IOException { if (!r.exists() || r.isFile()) { throw new FSException(NbBundle.getMessage(LocalFileSystem.class, "EXC_RootNotExist", r.getAbsolutePath())); } String oldDisplayName = getDisplayName(); _setSystemName(computeSystemName(r)); rootFile = r; firePropertyChange(PROP_ROOT, null, refreshRoot()); firePropertyChange(PROP_DISPLAY_NAME, oldDisplayName, getDisplayName()); }
/** Set whether the filesystem should be read only. * @param flag <code>true</code> if it should */ public void setReadOnly(boolean flag) { if (flag != readOnly) { readOnly = flag; firePropertyChange (PROP_READ_ONLY, !flag ? Boolean.TRUE : Boolean.FALSE, flag ? Boolean.TRUE : Boolean.FALSE); } }
/** Set whether the filesystem should be read only. * @param flag <code>true</code> if it should */ public void setReadOnly(boolean flag) { if (flag != readOnly) { readOnly = flag; firePropertyChange (PROP_READ_ONLY, !flag ? Boolean.TRUE : Boolean.FALSE, flag ? Boolean.TRUE : Boolean.FALSE); } }
/** Set the root directory of the filesystem. * @param r file to set root to * @exception PropertyVetoException if the value if vetoed by someone else (usually * by the {@link org.openide.filesystems.Repository Repository}) * @exception IOException if the root does not exists or some other error occured */ public synchronized void setRootDirectory (File r) throws PropertyVetoException, IOException { if (!r.exists() || r.isFile ()) { FSException.io ("EXC_RootNotExist", r.getAbsolutePath ()); // NOI18N } String oldDisplayName = getDisplayName (); setSystemName(computeSystemName (r)); rootFile = r; firePropertyChange(PROP_ROOT, null, refreshRoot ()); firePropertyChange (PROP_DISPLAY_NAME, oldDisplayName, getDisplayName ()); }
/** Set the root directory of the filesystem. * @param r file to set root to * @exception PropertyVetoException if the value if vetoed by someone else (usually * by the {@link org.openide.filesystems.Repository Repository}) * @exception IOException if the root does not exists or some other error occured */ public synchronized void setRootDirectory (File r) throws PropertyVetoException, IOException { if (!r.exists() || r.isFile ()) { FSException.io ("EXC_RootNotExist", r.getAbsolutePath ()); // NOI18N } String oldDisplayName = getDisplayName (); setSystemName(computeSystemName (r)); rootFile = r; firePropertyChange(PROP_ROOT, null, refreshRoot ()); firePropertyChange (PROP_DISPLAY_NAME, oldDisplayName, getDisplayName ()); }