/** * Returns the current numeric id (appendage) of the given managed file. * <code>managedFile + "." + getId(target)</code>. A value of -1 is returned * if the given name is not managed. * * @param managedFile the name of the managed file * @return the id of the managed file */ public int getId(String managedFile) { if (!open) return -1; Entry entry = (Entry) table.get(managedFile); if (entry == null) return -1; return entry.getReadId(); }
/** * Returns the current numeric id (appendage) of the given managed file. * <code>managedFile + "." + getId(target)</code>. A value of -1 is returned * if the given name is not managed. * * @param managedFile the name of the managed file * @return the id of the managed file */ public int getId(String managedFile) { if (!open) return -1; Entry entry = (Entry) table.get(managedFile); if (entry == null) return -1; return entry.getReadId(); }
/** * Returns the current numeric id (appendage) of the given managed file. * <code>managedFile + "." + getId(target)</code>. A value of -1 is returned * if the given name is not managed. * * @param managedFile the name of the managed file * @return the id of the managed file */ public int getId(String managedFile) { if (!open) return -1; Entry entry = (Entry) table.get(managedFile); if (entry == null) return -1; return entry.getReadId(); }
/** * Returns the actual file location to use when reading the given managed file. * A value of <code>null</code> can be returned if the given managed file name is not * managed and add is set to false. * <p> * The returned file should be considered read-only. Any updates to the content of this * file should be done using {@link #update(String[], String[])}. * * @param managedFile the managed file to lookup * @param add indicate whether the managed file name should be added to the manager if * it is not already managed. * @throws IOException if the add flag is set to true and the addition of the managed file failed * @return the absolute file location to use for the given managed file or * <code>null</code> if the given managed file is not managed */ public File lookup(String managedFile, boolean add) throws IOException { if (!open) throw new IOException(EclipseAdaptorMsg.fileManager_notOpen); Entry entry = (Entry) table.get(managedFile); if (entry == null) { if (add) { add(managedFile); entry = (Entry) table.get(managedFile); } else { return null; } } return new File(getAbsolutePath(managedFile + '.' + entry.getReadId())); }
/** * Returns the actual file location to use when reading the given managed file. * A value of <code>null</code> can be returned if the given managed file name is not * managed and add is set to false. * <p> * The returned file should be considered read-only. Any updates to the content of this * file should be done using {@link #update(String[], String[])}. * * @param managedFile the managed file to lookup * @param add indicate whether the managed file name should be added to the manager if * it is not already managed. * @throws IOException if the add flag is set to true and the addition of the managed file failed * @return the absolute file location to use for the given managed file or * <code>null</code> if the given managed file is not managed */ public File lookup(String managedFile, boolean add) throws IOException { if (!open) throw new IOException(Msg.fileManager_notOpen); Entry entry = (Entry) table.get(managedFile); if (entry == null) { if (add) { add(managedFile); entry = (Entry) table.get(managedFile); } else { return null; } } return new File(getAbsolutePath(managedFile + '.' + entry.getReadId())); }
/** * Returns the actual file location to use when reading the given managed file. * A value of <code>null</code> can be returned if the given managed file name is not * managed and add is set to false. * <p> * The returned file should be considered read-only. Any updates to the content of this * file should be done using {@link #update(String[], String[])}. * * @param managedFile the managed file to lookup * @param add indicate whether the managed file name should be added to the manager if * it is not already managed. * @throws IOException if the add flag is set to true and the addition of the managed file failed * @return the absolute file location to use for the given managed file or * <code>null</code> if the given managed file is not managed */ public File lookup(String managedFile, boolean add) throws IOException { if (!open) throw new IOException(EclipseAdaptorMsg.fileManager_notOpen); Entry entry = (Entry) table.get(managedFile); if (entry == null) { if (add) { add(managedFile); entry = (Entry) table.get(managedFile); } else { return null; } } return new File(getAbsolutePath(managedFile + '.' + entry.getReadId())); }
/** * Returns the actual file location to use when reading the given managed file. * A value of <code>null</code> can be returned if the given managed file name is not * managed and add is set to false. * <p> * The returned file should be considered read-only. Any updates to the content of this * file should be done using {@link #update(String[], String[])}. * * @param managedFile the managed file to lookup * @param add indicate whether the managed file name should be added to the manager if * it is not already managed. * @throws IOException if the add flag is set to true and the addition of the managed file failed * @return the absolute file location to use for the given managed file or * <code>null</code> if the given managed file is not managed */ public File lookup(String managedFile, boolean add) throws IOException { if (!open) throw new IOException(Msg.fileManager_notOpen); Entry entry = (Entry) table.get(managedFile); if (entry == null) { if (add) { add(managedFile); entry = (Entry) table.get(managedFile); } else { return null; } } return new File(getAbsolutePath(managedFile + '.' + entry.getReadId())); }
/** * Returns the actual file location to use when reading the given managed file. * A value of <code>null</code> can be returned if the given managed file name is not * managed and add is set to false. * <p> * The returned file should be considered read-only. Any updates to the content of this * file should be done using {@link #update(String[], String[])}. * * @param managedFile the managed file to lookup * @param add indicate whether the managed file name should be added to the manager if * it is not already managed. * @throws IOException if the add flag is set to true and the addition of the managed file failed * @return the absolute file location to use for the given managed file or * <code>null</code> if the given managed file is not managed */ public File lookup(String managedFile, boolean add) throws IOException { if (!open) throw new IOException(Msg.fileManager_notOpen); Entry entry = (Entry) table.get(managedFile); if (entry == null) { if (add) { add(managedFile); entry = (Entry) table.get(managedFile); } else { return null; } } return new File(getAbsolutePath(managedFile + '.' + entry.getReadId())); }
/** * Returns the actual file location to use when reading the given managed file. * A value of <code>null</code> can be returned if the given managed file name is not * managed and add is set to false. * <p> * The returned file should be considered read-only. Any updates to the content of this * file should be done using {@link #update(String[], String[])}. * * @param managedFile the managed file to lookup * @param add indicate whether the managed file name should be added to the manager if * it is not already managed. * @throws IOException if the add flag is set to true and the addition of the managed file failed * @return the absolute file location to use for the given managed file or * <code>null</code> if the given managed file is not managed */ public File lookup(String managedFile, boolean add) throws IOException { if (!open) throw new IOException(Msg.fileManager_notOpen); Entry entry = (Entry) table.get(managedFile); if (entry == null) { if (add) { add(managedFile); entry = (Entry) table.get(managedFile); } else { return null; } } return new File(getAbsolutePath(managedFile + '.' + entry.getReadId())); }
/** * Returns the actual file location to use when reading the given managed file. * A value of <code>null</code> can be returned if the given managed file name is not * managed and add is set to false. * <p> * The returned file should be considered read-only. Any updates to the content of this * file should be done using {@link #update(String[], String[])}. * * @param managedFile the managed file to lookup * @param add indicate whether the managed file name should be added to the manager if * it is not already managed. * @throws IOException if the add flag is set to true and the addition of the managed file failed * @return the absolute file location to use for the given managed file or * <code>null</code> if the given managed file is not managed */ public File lookup(String managedFile, boolean add) throws IOException { if (!open) throw new IOException(Msg.fileManager_notOpen); Entry entry = (Entry) table.get(managedFile); if (entry == null) { if (add) { add(managedFile); entry = (Entry) table.get(managedFile); } else { return null; } } return new File(getAbsolutePath(managedFile + '.' + entry.getReadId())); }
/** * Returns the actual file location to use when reading the given managed file. * A value of <code>null</code> can be returned if the given managed file name is not * managed and add is set to false. * <p> * The returned file should be considered read-only. Any updates to the content of this * file should be done using {@link #update(String[], String[])}. * * @param managedFile the managed file to lookup * @param add indicate whether the managed file name should be added to the manager if * it is not already managed. * @throws IOException if the add flag is set to true and the addition of the managed file failed * @return the absolute file location to use for the given managed file or * <code>null</code> if the given managed file is not managed */ public File lookup(String managedFile, boolean add) throws IOException { if (!open) throw new IOException(Msg.fileManager_notOpen); Entry entry = (Entry) table.get(managedFile); if (entry == null) { if (add) { add(managedFile); entry = (Entry) table.get(managedFile); } else { return null; } } return new File(getAbsolutePath(managedFile + '.' + entry.getReadId())); }
/** * Returns the current numeric id (appendage) of the given managed file. * <code>managedFile + "." + getId(target)</code>. A value of -1 is returned * if the given name is not managed. * * @param managedFile the name of the managed file * @return the id of the managed file */ public int getId(String managedFile) { if (!open) return -1; Entry entry = (Entry) table.get(managedFile); if (entry == null) return -1; return entry.getReadId(); }
/** * Returns the current numeric id (appendage) of the given managed file. * <code>managedFile + "." + getId(target)</code>. A value of -1 is returned * if the given name is not managed. * * @param managedFile the name of the managed file * @return the id of the managed file */ public int getId(String managedFile) { if (!open) return -1; Entry entry = (Entry) table.get(managedFile); if (entry == null) return -1; return entry.getReadId(); }
/** * Returns the current numeric id (appendage) of the given managed file. * <code>managedFile + "." + getId(target)</code>. A value of -1 is returned * if the given name is not managed. * * @param managedFile the name of the managed file * @return the id of the managed file */ public int getId(String managedFile) { if (!open) return -1; Entry entry = (Entry) table.get(managedFile); if (entry == null) return -1; return entry.getReadId(); }
/** * Returns the current numeric id (appendage) of the given managed file. * <code>managedFile + "." + getId(target)</code>. A value of -1 is returned * if the given name is not managed. * * @param managedFile the name of the managed file * @return the id of the managed file */ public int getId(String managedFile) { if (!open) return -1; Entry entry = (Entry) table.get(managedFile); if (entry == null) return -1; return entry.getReadId(); }
/** * Returns the current numeric id (appendage) of the given managed file. * <code>managedFile + "." + getId(target)</code>. A value of -1 is returned * if the given name is not managed. * * @param managedFile the name of the managed file * @return the id of the managed file */ public int getId(String managedFile) { if (!open) return -1; Entry entry = (Entry) table.get(managedFile); if (entry == null) return -1; return entry.getReadId(); }