public void rename(String oldName, String newName) throws IOException { if (! is(oldName)) throw new IOException("The file to rename does not exist."); if (is(newName)) throw new IOException("Cannot rename to existing file"); if (newName.length () > 0 && newName.charAt(0) == '/') newName = newName.substring (1); Entry e = e (oldName); entries.remove(oldName); entries.put (newName, e); }
public void rename(String oldName, String newName) throws IOException { if (! is(oldName)) throw new IOException("The file to rename does not exist."); if (is(newName)) throw new IOException("Cannot rename to existing file"); if (newName.length () > 0 && newName.charAt(0) == '/') newName = newName.substring (1); Entry e = e (oldName); entries.remove(oldName); entries.put (newName, e); }
public void createFolder(String name) throws java.io.IOException { if (is(name)) throw new IOException("File already exists"); e (name).data = null; }
public void createData(String name) throws IOException { if (is(name)) throw new IOException("File already exists"); e (name).data = new byte[0]; }
public void createFolder(String name) throws java.io.IOException { if (is(name)) throw new IOException("File already exists"); e (name).data = null; }
public void createData(String name) throws IOException { if (is(name)) throw new IOException("File already exists"); e (name).data = new byte[0]; }
public Object readAttribute(String name, String attrName) { return is (name) ? e (name).attrs.get (attrName) : null; }
public Object readAttribute(String name, String attrName) { return is (name) ? e (name).attrs.get (attrName) : null; }
public Enumeration attributes(String name) { return is (name) ? Collections.enumeration (e (name).attrs.keySet ()) : org.openide.util.Enumerations.empty(); }
public Enumeration attributes(String name) { return is (name) ? Collections.enumeration (e (name).attrs.keySet ()) : org.openide.util.Enumerations.empty(); }