Examples of FSEntry


Examples of org.jnode.fs.FSEntry

            throw new ReadOnlyFileSystemException("Filesystem or directory is mounted read-only!");

        if (getEntry(name) != null) {
            throw new IOException("File or directory already exists: " + name);
        }
        FSEntry newEntry = createFileEntry(name);
        setFreeEntry(newEntry);

        log.debug("<<< END addFile " + name + " >>>");
        return newEntry;
    }
View Full Code Here

Examples of org.jnode.fs.FSEntry

            public boolean hasNext() {
                return index < usedEntries.size();
            }

            public FSEntry next() {
                final FSEntry entry = usedEntries.get(index);
                index++;
                return entry;
            }

            /**
 
View Full Code Here

Examples of org.jnode.fs.FSEntry

        name = normalizeName(name);
        int index = entryNames.indexOf(name);
        if (index < 0)
            return -1;

        FSEntry entry = entries.get(name);
        if (entry != null) {
            entriesById.remove(entry.getId());
        }

        // in entries and entryNames, a free (deleted) entry
        // is represented by null
        entries.put(name, null);
View Full Code Here

Examples of org.jnode.fs.FSEntry

        if (index < 0)
            return -1;

        entryNames.set(index, newName);

        FSEntry entry = entries.remove(oldName);
        entries.put(newName, entry);

        log.debug("<<< END rename return true >>>");
        return index;
    }
View Full Code Here

Examples of org.jnode.fs.FSEntry

    /**
     * @see java.util.Iterator#next()
     */
    public FSEntry next() throws NoSuchElementException {
        if (hasNext()) {
            FSEntry current = it.next();
            if (current instanceof JIFSFile)
                ((JIFSFile) current).refresh();
            if (current instanceof JIFSDirectory)
                ((JIFSDirectory) current).refresh();

View Full Code Here

Examples of org.jnode.fs.FSEntry

     *
     * @see org.jnode.fs.FSDirectory#remove(java.lang.String)
     */
    public void remove(String name) throws IOException {

        FSEntry entry = entries.remove(name);

        if (entry == null)
            throw new IOException("Entry not found");

        if (entry instanceof RAMFile) {
View Full Code Here

Examples of org.jnode.fs.FSEntry

     * @throws IOException
     */
    private void remove() throws IOException {
        Iterator<FSEntry> itr = entries.values().iterator();
        while (itr.hasNext()) {
            FSEntry entry = itr.next();
            if (entry instanceof RAMFile) {
                RAMFile file = (RAMFile) entry;
                file.remove();
            } else {
                RAMDirectory dir = (RAMDirectory) entry;
View Full Code Here

Examples of org.jnode.fs.FSEntry

        }

        if (getEntry(name) != null) {
            throw new IOException("File or Directory already exists : " + name);
        }
        FSEntry newEntry = createDirectoryEntry(name);
        setFreeEntry(newEntry);
        log.debug("Directory " + name + " added");
        return newEntry;
    }
View Full Code Here

Examples of org.jnode.fs.FSEntry

            throw new ReadOnlyFileSystemException();
        }
        if (getEntry(name) != null) {
            throw new IOException("File or directory already exists: " + name);
        }
        FSEntry newEntry = createFileEntry(name);
        setFreeEntry(newEntry);

        return newEntry;
    }
View Full Code Here

Examples of org.jnode.fs.FSEntry

                    } else {
                        entry.setName(className);
                    }
                }
                entry.setParent(extdir);
                FSEntry add = entry;
                extdir.addFSE(add);
            } catch (ClassCastException ex) {
                log.error("Given class " + className + " does not implement .");
            } catch (ClassNotFoundException ex) {
                log.error("Cannot load  " + className);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.