Package org.jnode.fs

Examples of org.jnode.fs.ReadOnlyFileSystemException


    /**
     *
     */
    public FSEntry addFile(String name) throws IOException {
        throw new ReadOnlyFileSystemException();
    }
View Full Code Here


    /**
     *
     */
    public FSEntry addDirectory(String name) throws IOException {
        throw new ReadOnlyFileSystemException();
    }
View Full Code Here

    /**
     * Remove the entry with the given name from this directory.
     */
    public void remove(String name) throws IOException {
        throw new ReadOnlyFileSystemException();
    }
View Full Code Here

        super(fs, nrEntries);
    }

    public FSEntry addFile(String name) throws IOException {
        if (getFileSystem().isReadOnly()) {
            throw new ReadOnlyFileSystemException("addFile in readonly filesystem");
        }

        name = name.trim();
        String shortName = generateShortNameFor(name);
        FatDirEntry realEntry = new FatDirEntry(this, splitName(shortName), splitExt(shortName));
View Full Code Here

        return entry;
    }

    public FSEntry addDirectory(String name) throws IOException {
        if (getFileSystem().isReadOnly()) {
            throw new ReadOnlyFileSystemException("addDirectory in readonly filesystem");
        }

        name = name.trim();
        String shortName = generateShortNameFor(name);
        FatDirEntry realEntry = new FatDirEntry(this, splitName(shortName), splitExt(shortName));
View Full Code Here

    public synchronized void write(long fileOffset, ByteBuffer srcBuf) throws IOException {
        int len = srcBuf.remaining();

        if (getFileSystem().isReadOnly()) {
            throw new ReadOnlyFileSystemException("write in readonly filesystem");
        }

        final long max = (isDir) ? getLengthOnDisk() : getLength();
        if (fileOffset > max) {
            throw new IOException("Cannot write beyond the EOF");
View Full Code Here

     * @param length The length to set
     */
    public synchronized void setLength(long length) throws IOException {

        if (getFileSystem().isReadOnly()) {
            throw new ReadOnlyFileSystemException("setLength in readonly filesystem");
        }

        if (this.length == length) {
            // Do nothing
            return;
View Full Code Here

     * @param nameExt
     * @throws IOException
     */
    protected synchronized FatDirEntry addFatFile(String nameExt) throws IOException {
        if (getFileSystem().isReadOnly()) {
            throw new ReadOnlyFileSystemException("addFile in readonly filesystem");
        }

        if (getFatEntry(nameExt) != null) {
            throw new IOException("File already exists" + nameExt);
        }
View Full Code Here

     * @param name
     * @throws IOException
     */
    public FSEntry addDirectory(String name) throws IOException {
        if (getFileSystem().isReadOnly()) {
            throw new ReadOnlyFileSystemException("addDirectory in readonly filesystem");
        }

        final long parentCluster;
        if (file == null) {
            parentCluster = 0;
View Full Code Here

        return iNode.getSize();
    }

    @Override
    public void setLength(long length) throws IOException {
        if (!canWrite()) throw new ReadOnlyFileSystemException("FileSystem or File is readonly");

        long blockSize = iNode.getExt2FileSystem().getBlockSize();

        // synchronize to the inode cache to make sure that the inode does not
        // get
View Full Code Here

TOP

Related Classes of org.jnode.fs.ReadOnlyFileSystemException

Copyright © 2018 www.massapicom. 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.