Package com.nexirius.util

Examples of com.nexirius.util.XFile.mkdirs()


        if (!targetDir.endsWith(XFile.separator)) {
            targetDir = targetDir + XFile.separator;
        }

        XFile target = new XFile(targetDir);
        target.mkdirs();

        m_root = new XFile(dirname);
        m_files = m_root.getFiles(true);

        for (String fname = m_files.firstItem(); fname != null; fname = m_files.nextItem()) {
View Full Code Here


        m_files = m_root.getFiles(true);

        for (String fname = m_files.firstItem(); fname != null; fname = m_files.nextItem()) {
            XFile newfile = new XFile(targetDir, fname);

            newfile.mkdirs();
            newfile.delete();
            newfile.createFrom(new XFile(dirname, fname), false);
        }

        return go(targetDir, pat, rep, extension);
View Full Code Here

     * @param persistenceRootDirectory
     */
    public static void init(String persistenceRootDirectory) {
        XFile dir = new XFile(persistenceRootDirectory);

        dir.mkdirs();
        instance = new FilePersistence(persistenceRootDirectory);
    }

    public static FilePersistence getInstance() {
        if (instance == null) {
View Full Code Here

    }

    private XFile getDirectory(Class cl) {
        XFile dir = new XFile(rootDirectory + cl.getName());
        if (!dir.isDirectory()) {
            dir.mkdirs();
        }
        return dir;
    }

    /**
 
View Full Code Here

    }

    public void writeInfoToDirectory(String dirName) {
        XFile dir = new XFile(dirName);

        dir.mkdirs();
        dir.mkdir();

        XFile dirInfo = new XFile(dirName, DIR_INFO_FILENAME);

        if (dirList != null) {
View Full Code Here

            }

            XFile trashDir = new XFile(parent, root.getName() + TRASH_POSTFIX);
            XFile targetTrashDir = new XFile(trashDir + XFile.separator + directoryName);

            targetTrashDir.mkdirs();

            XFile targetTrashFile = new XFile(targetTrashDir.getPath(), fileName);

            targetFile.renameTo(targetTrashFile);
        } else {
View Full Code Here

        if (file.exists()) {
            if (!file.isDirectory()) {
                throw new Exception("Can't create directory '" + dir + "' because this name corresponds to an existing file");
            }
        } else if (!file.mkdirs()) {
            throw new Exception("Can't create directory '" + dir + "'");
        }
    }

    public int getNotSaved(DataModelVector v) {
View Full Code Here

TOP
Copyright © 2015 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.