public boolean deleteToNonEmptyParent() { for (DesktopEntryFile localDesktopEntryFile = this; (null != localDesktopEntryFile) && (localDesktopEntryFile.exists()) && (!localDesktopEntryFile.getURI().matches(".*://")) && (localDesktopEntryFile.delete()); localDesktopEntryFile = localDesktopEntryFile.getParentDesktopEntryFile()) Trace.println("file deleted " + localDesktopEntryFile.toString(), TraceLevel.BASIC); return true; }
private void writeEntryInternal() throws IOException { DesktopEntryFile localDesktopEntryFile = getParentDesktopEntryFile(); ArrayList localArrayList = new ArrayList(); while ((null != localDesktopEntryFile) && (!localDesktopEntryFile.exists())) { localArrayList.add(localDesktopEntryFile); localDesktopEntryFile = localDesktopEntryFile.getParentDesktopEntryFile(); } for (int i = localArrayList.size() - 1; i >= 0; i--) { localDesktopEntryFile = (DesktopEntryFile) localArrayList.get(i); Trace.println( "writeEntryInternal mkdir " + localDesktopEntryFile.toString(), TraceLevel.BASIC); localDesktopEntryFile.mkdir(); } StringBuffer localStringBuffer = new StringBuffer(); Iterator localIterator = this.desktopEntries.iterator(); while (localIterator.hasNext()) { localStringBuffer.append(localIterator.next()); localStringBuffer.append("\n"); } Trace.println("gnome_vfs_write_file [" + this.uri.toString() + "]", TraceLevel.BASIC); boolean bool = gnome_vfs_write_file(this.uri.toString(), localStringBuffer.toString()); }