create Folder - Android File Input Output

Android examples for File Input Output:Directory

Description

create Folder

Demo Code


//package com.java2s;
import java.io.File;

public class Main {
    static public String createFolder(String t) {
        File d = new File(t);

        if (d.exists()) {
            return "Folder already exists";
        }/* w w w .j  a  va2  s  . c o m*/
        if (!d.mkdir()) {
            return "Folder couldn't been created";
        }
        return "";
    }
}

Related Tutorials