protected void lock(String name) throws IOException { throw new FSException(NbBundle.getMessage(JarFileSystem.class, "EXC_CannotLock_JAR", name, root)); }
/** Creates the localized exception. * @param resource to take localization string from * @exception the exception */ public static void io (String resource) throws IOException { FSException fsExc = new FSException (resource, null); ErrorManager.getDefault().annotate (fsExc, ErrorManager.WARNING, null, fsExc.getLocalizedMessage(), null, null); throw fsExc; }
/** * Does nothing to lock the file. * * @param name name of the file * @throws IOException if cannot be locked */ public void lock (String name) throws IOException { FSException.io ("EXC_CannotLock", name, fs.getDisplayName (), name); // NOI18N }
/** Message should be meaning full, but different from localized one. */ public String getMessage () { return " " + getLocalizedMessage (); // NOI18N }
public static void io (String resource, Object arg1) throws IOException { FSException fsExc = new FSException (resource, new Object[] { arg1 }); ErrorManager.getDefault().annotate (fsExc, ErrorManager.WARNING, null, fsExc.getLocalizedMessage(), null, null); throw fsExc; }
/** * Does nothing to lock the file. * * @param name name of the file * @throws IOException if cannot be locked */ public void lock (String name) throws IOException { FSException.io ("EXC_CannotLock", name, fs.getDisplayName (), name); // NOI18N }
/** Message should be meaning full, but different from localized one. */ public String getMessage () { return " " + getLocalizedMessage (); // NOI18N }
public static void io ( String resource, Object arg1, Object arg2, Object arg3, Object arg4 ) throws IOException { FSException fsExc = new FSException (resource, new Object[] { arg1, arg2, arg3, arg4 }); ErrorManager.getDefault().annotate (fsExc, ErrorManager.WARNING, null, fsExc.getLocalizedMessage(), null, null); throw fsExc; }
public void lock(String name) throws IOException { throw new FSException(NbBundle.getMessage(XMLFileSystem.class, "EXC_CannotLock", null, null, name)); }
protected void lock (String name) throws IOException { FSException.io ("EXC_CannotLock", name, getDisplayName (), name); // NOI18N }
public static void io ( String resource, Object arg1, Object arg2 ) throws IOException { FSException fsExc = new FSException (resource, new Object[] { arg1, arg2 }); ErrorManager.getDefault().annotate (fsExc, ErrorManager.WARNING, null, fsExc.getLocalizedMessage(), null, null); throw fsExc; }
protected void createFolder(String name) throws java.io.IOException { File f = getFile(name); if (name.equals("")) { // NOI18N throw new FSException(NbBundle.getMessage(LocalFileSystem.class, "EXC_CannotCreateF", f.getName(), getDisplayName(), f.getAbsolutePath())); } if (f.exists()) { throw new FSException(NbBundle.getMessage(LocalFileSystem.class, "EXC_FolderAlreadyExist", f.getName(), getDisplayName(), f.getAbsolutePath())); } boolean b = createRecursiveFolder(f); if (!b) { throw new FSException(NbBundle.getMessage(LocalFileSystem.class, "EXC_CannotCreateF", f.getName(), getDisplayName(), f.getAbsolutePath())); } }
protected void lock (String name) throws IOException { FSException.io ("EXC_CannotLock", name, getDisplayName (), name); // NOI18N }
public static void io ( String resource, Object arg1, Object arg2, Object arg3, Object arg4 ) throws IOException { FSException fsExc = new FSException (resource, new Object[] { arg1, arg2, arg3, arg4 }); ErrorManager.getDefault().annotate (fsExc, ErrorManager.WARNING, null, fsExc.getLocalizedMessage(), null, null); throw fsExc; }
protected void lock(String name) throws IOException { File file = getFile(name); if ((!file.canWrite() && file.exists()) || isReadOnly()) { throw new FSException(NbBundle.getMessage(LocalFileSystem.class, "EXC_CannotLock", null, null, file.getAbsolutePath())); } }
protected void createFolder (String name) throws java.io.IOException { File f = getFile (name); if (name.equals ("")) { // NOI18N FSException.io ("EXC_CannotCreateF", new Object[] { f.getName (), getDisplayName (), f.getAbsolutePath ()}); // NOI18N } if (f.exists()) { FSException.io ("EXC_FolderAlreadyExist", new Object[] { f.getName (), getDisplayName (), f.getAbsolutePath ()}); // NOI18N } boolean b = createRecursiveFolder(f); if (!b) { FSException.io ("EXC_CannotCreateF", new Object[] { f.getName (), getDisplayName (), f.getAbsolutePath ()}); // NOI18N } }
public static void io ( String resource, Object arg1, Object arg2 ) throws IOException { FSException fsExc = new FSException (resource, new Object[] { arg1, arg2 }); ErrorManager.getDefault().annotate (fsExc, ErrorManager.WARNING, null, fsExc.getLocalizedMessage(), null, null); throw fsExc; }
/** 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]; }
protected void createFolder (String name) throws java.io.IOException { File f = getFile (name); if (name.equals ("")) { // NOI18N FSException.io ("EXC_CannotCreateF", new Object[] { f.getName (), getDisplayName (), f.getAbsolutePath ()}); // NOI18N } if (f.exists()) { FSException.io ("EXC_FolderAlreadyExist", new Object[] { f.getName (), getDisplayName (), f.getAbsolutePath ()}); // NOI18N } boolean b = createRecursiveFolder(f); if (!b) { FSException.io ("EXC_CannotCreateF", new Object[] { f.getName (), getDisplayName (), f.getAbsolutePath ()}); // NOI18N } }
/** Creates the localized exception. * @param resource to take localization string from * @exception the exception */ public static void io (String resource) throws IOException { FSException fsExc = new FSException (resource, null); ErrorManager.getDefault().annotate (fsExc, ErrorManager.WARNING, null, fsExc.getLocalizedMessage(), null, null); throw fsExc; }