/** Finds the system to create writable version of the file on. * * @param name name of the file (full) * @return the first one * @exception IOException if the filesystem is readonly */ protected FileSystem createWritableOn(String name) throws IOException { if (isReadOnly()) { throw new FSException(NbBundle.getMessage(MultiFileSystem.class, "EXC_FSisRO", getDisplayName())); } return systems[WRITE_SYSTEM_INDEX]; }
/** Tests the lock if it is valid, if not throws exception. * @param l lock to test * @return the mf lock for this file object */ private MfLock testLock(FileLock l) throws java.io.IOException { if (lock == null) { throw new FSException(NbBundle.getMessage(MultiFileObject.class, "EXC_InvalidLock", l, getPath(), getMultiFileSystem().getDisplayName(), lock)); } if (lock.get() != l) { throw new FSException(NbBundle.getMessage(MultiFileObject.class, "EXC_InvalidLock", l, getPath(), getMultiFileSystem().getDisplayName(), lock.get())); } return (MfLock) l; }
throw new FSException(NbBundle.getMessage(MultiFileObject.class, "EXC_FSisRO", fs.getDisplayName())); throw new FSException(NbBundle.getMessage(MultiFileObject.class, "EXC_FisRO", name, fs.getDisplayName())); throw new FSException(NbBundle.getMessage(MultiFileObject.class, "EXC_FoNotFolder", n, getPath(), fs.getDisplayName())); throw new FSException(NbBundle.getMessage(MultiFileObject.class, "EXC_DataAlreadyExist", n, fs.getDisplayName(), getPath()));
throw new FSException(NbBundle.getMessage(MultiFileObject.class, "EXC_FSisRO", fs.getDisplayName())); Exceptions.attachLocalizedMessage(ex, NbBundle.getMessage(MultiFileObject.class, "EXC_FisRO", name, fs.getDisplayName())); throw ex; throw new FSException(NbBundle.getMessage(MultiFileObject.class, "EXC_FoNotFolder", name, getPath(), fs.getDisplayName())); throw new FSException(NbBundle.getMessage(MultiFileObject.class, "EXC_FolderAlreadyExist", name, fs.getDisplayName(), getPath()));
throw new FSException(NbBundle.getMessage(MultiFileObject.class, "EXC_CannotDeleteRoot", fs.getDisplayName())); throw new FSException(NbBundle.getMessage(MultiFileObject.class, "EXC_FSisRO", fs.getDisplayName()));
throw new FSException(NbBundle.getMessage(MultiFileObject.class, "EXC_CannotRenameRoot", fs.getDisplayName())); getPath(), getMultiFileSystem().getDisplayName(), newFullName)); throw new FSException(NbBundle.getMessage(MultiFileObject.class, "EXC_FSisRO", getMultiFileSystem().getDisplayName()));
void handleDelete(FileLock lock) throws IOException { if (parent == null) { throw new FSException(NbBundle.getMessage(MultiFileObject.class, "EXC_CannotDeleteRoot", getMultiFileSystem().getDisplayName())); } MultiFileSystem fs = getMultiFileSystem(); try { getFileSystem().beginAtomicAction(); synchronized (parent) { String fullName = getPath(); FileSystem single = fs.createWritableOn(fullName); if (needsMask(lock, true)) { getMultiFileSystem().maskFile(single, fullName); updateFoldersLock(getParent()); } String n = name; validFlag = false; /** [PENDING] expected rename of some refresh method */ //parent.internalRefresh (null, n, true, false, null); parent.refresh(null, n, true, false); if (hasAtLeastOneListeners()) { fileDeleted0(new FileEvent(this)); } } } finally { getFileSystem().finishAtomicAction(); } }
/** Finds the system to create writable version of the file on. * * @param name name of the file (full) * @return the first one * @exception IOException if the filesystem is readonly */ protected FileSystem createWritableOn (String name) throws IOException { if (systems[WRITE_SYSTEM_INDEX] == null || systems[WRITE_SYSTEM_INDEX].isReadOnly ()) { FSException.io ("EXC_FSisRO", getDisplayName ()); // NOI18N } return systems[WRITE_SYSTEM_INDEX]; }
/** Finds the system to create writable version of the file on. * * @param name name of the file (full) * @return the first one * @exception IOException if the filesystem is readonly */ protected FileSystem createWritableOn (String name) throws IOException { if (systems[WRITE_SYSTEM_INDEX] == null || systems[WRITE_SYSTEM_INDEX].isReadOnly ()) { FSException.io ("EXC_FSisRO", getDisplayName ()); // NOI18N } return systems[WRITE_SYSTEM_INDEX]; }
/** Tests the lock if it is valid, if not throws exception. * @param l lock to test * @return the mf lock for this file object */ private MfLock testLock (FileLock l) throws java.io.IOException { if (lock == null) FSException.io ("EXC_InvalidLock", l, getPath (), getMultiFileSystem ().getDisplayName (), lock); // NOI18N if (lock.get () != l) FSException.io ("EXC_InvalidLock", l, getPath (), getMultiFileSystem ().getDisplayName (), lock.get ()); // NOI18N return (MfLock)l; }
/** Tests the lock if it is valid, if not throws exception. * @param l lock to test * @return the mf lock for this file object */ private MfLock testLock (FileLock l) throws java.io.IOException { if (lock == null) FSException.io ("EXC_InvalidLock", l, getPath (), getMultiFileSystem ().getDisplayName (), lock); // NOI18N if (lock.get () != l) FSException.io ("EXC_InvalidLock", l, getPath (), getMultiFileSystem ().getDisplayName (), lock.get ()); // NOI18N return (MfLock)l; }
MultiFileSystem fs = getMultiFileSystem (); if (fs.isReadOnly()) { FSException.io ("EXC_FSisRO", fs.getDisplayName ()); // NOI18N FSException.io ("EXC_FisRO", name, fs.getDisplayName ()); // NOI18N FSException.io ("EXC_FoNotFolder", n, getPath(), fs.getDisplayName ()); // NOI18N FSException.io ("EXC_DataAlreadyExist", n, fs.getDisplayName ()); // NOI18N
MultiFileSystem fs = getMultiFileSystem (); if (fs.isReadOnly()) { FSException.io ("EXC_FSisRO", fs.getDisplayName ()); // NOI18N FSException.io ("EXC_FisRO", name, fs.getDisplayName ()); // NOI18N FSException.io ("EXC_FoNotFolder", n, getPath(), fs.getDisplayName ()); // NOI18N FSException.io ("EXC_DataAlreadyExist", n, fs.getDisplayName ()); // NOI18N
MultiFileSystem fs = getMultiFileSystem (); if (fs.isReadOnly()) { FSException.io ("EXC_FSisRO", fs.getDisplayName ()); // NOI18N FSException.io ("EXC_FisRO", name, fs.getDisplayName ()); // NOI18N FSException.io ("EXC_FoNotFolder", name, getPath(), fs.getDisplayName ()); // NOI18N FSException.io ("EXC_FolderAlreadyExist", name, fs.getDisplayName ()); // NOI18N
MultiFileSystem fs = getMultiFileSystem (); if (fs.isReadOnly()) { FSException.io ("EXC_FSisRO", fs.getDisplayName ()); // NOI18N FSException.io ("EXC_FisRO", name, fs.getDisplayName ()); // NOI18N FSException.io ("EXC_FoNotFolder", name, getPath(), fs.getDisplayName ()); // NOI18N FSException.io ("EXC_FolderAlreadyExist", name, fs.getDisplayName ()); // NOI18N
if (parent == null) { FSException.io ( "EXC_CannotDeleteRoot", fs.getDisplayName () // NOI18N ); FSException.io ("EXC_FSisRO", fs.getDisplayName ()); // NOI18N
if (parent == null) { FSException.io ( "EXC_CannotDeleteRoot", fs.getDisplayName () // NOI18N ); FSException.io ("EXC_FSisRO", fs.getDisplayName ()); // NOI18N
void handleDelete (FileLock lock) throws IOException { if (parent == null) { FSException.io ( "EXC_CannotDeleteRoot", getMultiFileSystem ().getDisplayName () // NOI18N ); } MultiFileSystem fs = getMultiFileSystem (); try { getFileSystem ().beginAtomicAction (); synchronized (parent) { String fullName = getPath (); FileSystem single = fs.createWritableOn (fullName); if (needsMask (lock, true)) { getMultiFileSystem ().maskFile (single, fullName); updateFoldersLock (getParent ()); } String n = name; validFlag = false; /** [PENDING] expected rename of some refresh method */ //parent.internalRefresh (null, n, true, false, null); parent.refresh (null, n, true, false); if (hasAtLeastOneListeners ()) { fileDeleted0 (new FileEvent(this)); } } } finally { getFileSystem ().finishAtomicAction (); } }
void handleDelete (FileLock lock) throws IOException { if (parent == null) { FSException.io ( "EXC_CannotDeleteRoot", getMultiFileSystem ().getDisplayName () // NOI18N ); } MultiFileSystem fs = getMultiFileSystem (); try { getFileSystem ().beginAtomicAction (); synchronized (parent) { String fullName = getPath (); FileSystem single = fs.createWritableOn (fullName); if (needsMask (lock, true)) { getMultiFileSystem ().maskFile (single, fullName); updateFoldersLock (getParent ()); } String n = name; validFlag = false; /** [PENDING] expected rename of some refresh method */ //parent.internalRefresh (null, n, true, false, null); parent.refresh (null, n, true, false); if (hasAtLeastOneListeners ()) { fileDeleted0 (new FileEvent(this)); } } } finally { getFileSystem ().finishAtomicAction (); } }
FSException.io ("EXC_CannotRenameRoot", fs.getDisplayName ()); // NOI18N FSException.io ("EXC_CannotRename", getPath (), getMultiFileSystem ().getDisplayName (), newFullName); // NOI18N FSException.io ("EXC_FSisRO", getMultiFileSystem ().getDisplayName ()); // NOI18N