Code example for File

Methods: exists, getPath, mkdir

0
            throws IOException, IllegalArgumentException { 
        if (aContext == null)
            throw new IllegalArgumentException("Must provide a valid context");
        File filesDir = GeckoDirProvider.getFilesDir(aContext);
 
        File mozDir = new File(filesDir, "mozilla");
        if (!mozDir.exists()) {
            if (!mozDir.mkdir())
                throw new IOException("Unable to create mozilla directory at " + mozDir.getPath());
        } 
        return mozDir;
    } 
 
    static final char kTable[] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
                                   'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 
                                   '1', '2', '3', '4', '5', '6', '7', '8', '9', '0' }; 
 
    private static File createProfileDir(final File aRootDir, final String aProfileName)
            throws IOException, IllegalArgumentException { 
 
        if (aRootDir == null)