Code example for File

Methods: existsgetAbsoluteFilegetAbsolutePathmkdirs

0
     *            the root under which files will be stored. The directory will be created if it does not exist. 
     * @see FileContentStore#FileContentStore(File) 
     */ 
    /*package*/ FileContentStore(String rootDirectoryStr)
    { 
        this(new File(rootDirectoryStr));
    } 
 
    /** 
     * Private: for Spring-constructed instances only. 
     *  
     * @param rootDirectory 
     *            the root under which files will be stored. The directory will be created if it does not exist. 
     */ 
    private FileContentStore(File rootDirectory)
    { 
        if (!rootDirectory.exists())
        { 
            if (!rootDirectory.mkdirs())
            { 
                throw new ContentIOException("Failed to create store root: " + rootDirectory, null);
            } 
        } 
        this.rootDirectory = rootDirectory.getAbsoluteFile();
        rootAbsolutePath = rootDirectory.getAbsolutePath();
        allowRandomAccess = true;
        readOnly = false;
    } 
     
    /** 
Contextual code suggestions in your IDE  Get Codota for Java