Package org.apache.jackrabbit.core.fs

Examples of org.apache.jackrabbit.core.fs.FileSystemException


        try {
            return new RAFOutputStream(new RandomAccessFile(f, "rw"));
        } catch (IOException e) {
            String msg = "failed to get output stream for " + f.getPath();
            log.debug(msg);
            throw new FileSystemException(msg, e);
        }
    }
View Full Code Here


    public boolean hasChildren(String path) throws FileSystemException {
        File f = new File(root, osPath(path));
        if (!f.exists()) {
            String msg = f.getPath() + " does not exist";
            log.debug(msg);
            throw new FileSystemException(msg);
        }
        if (f.isFile()) {
            return false;
        }
        return (f.list().length > 0);
View Full Code Here

        File f = new File(root, osPath(folderPath));
        String[] entries = f.list();
        if (entries == null) {
            String msg = folderPath + " does not denote a folder";
            log.debug(msg);
            throw new FileSystemException(msg);
        }
        return entries;
    }
View Full Code Here

            }
        });
        if (files == null) {
            String msg = folderPath + " does not denote a folder";
            log.debug(msg);
            throw new FileSystemException(msg);
        }
        String[] entries = new String[files.length];
        for (int i = 0; i < files.length; i++) {
            entries[i] = files[i].getName();
        }
View Full Code Here

            }
        });
        if (folders == null) {
            String msg = folderPath + " does not denote a folder";
            log.debug(msg);
            throw new FileSystemException(msg);
        }
        String[] entries = new String[folders.length];
        for (int i = 0; i < folders.length; i++) {
            entries[i] = folders[i].getName();
        }
View Full Code Here

                FileUtil.delete(dest);
            } catch (IOException ioe) {
                String msg = "moving " + src.getPath() + " to "
                        + dest.getPath() + " failed";
                log.debug(msg);
                throw new FileSystemException(msg, ioe);
            }
        }
        File destParent = dest.getParentFile();
        if (!destParent.exists()) {
            // create destination parent folder first
            if (!destParent.mkdirs()) {
                String msg = "moving " + src.getPath() + " to "
                        + dest.getPath() + " failed";
                log.debug(msg);
                throw new FileSystemException(msg);
            }
        }

        // now we're ready to move/rename the file/folder
        if (!src.renameTo(dest)) {
            String msg = "moving " + src.getPath() + " to "
                    + dest.getPath() + " failed";
            log.debug(msg);
            throw new FileSystemException(msg);
        }
    }
View Full Code Here

            initialized = true;
        } catch (Exception e) {
            String msg = "failed to initialize file system";
            log.error(msg, e);
            throw new FileSystemException(msg, e);
        }
    }
View Full Code Here

            // close jdbc connection
            closeConnection(con);
        } catch (SQLException e) {
            String msg = "error closing file system";
            log.error(msg, e);
            throw new FileSystemException(msg, e);
        } finally {
            initialized = false;
        }
    }
View Full Code Here

        FileSystemPathUtil.checkFormat(folderPath);

        if (!exists(folderPath)) {
            createDeepFolder(folderPath);
        } else {
            throw new FileSystemException("file system entry already exists: " + folderPath);
        }
    }
View Full Code Here

                        deleteFileSQL, new Object[]{parentDir, name});
                count = stmt.getUpdateCount();
            } catch (SQLException e) {
                String msg = "failed to delete file: " + filePath;
                log.error(msg, e);
                throw new FileSystemException(msg, e);
            }
        }

        if (count == 0) {
            throw new FileSystemException("no such file: " + filePath);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.core.fs.FileSystemException

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.