我在测试中有以下代码
public class TestMe {
  private static final String BACKUP_DIR_PATH = "~/backup";
  @Test
  public static void createBackupDir() throws IOException {
    File path = new File(BACKUP_DIR_PATH + "/" + getFolderName()).getCanonicalFile();
    System.out.println(path.mkdirs());
  }
  // returns 2012-07-23
  private static String getFolderName() {
    DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
    Date date = new Date();
    return dateFormat.format(date).toString();
  }
}
当我运行此测试时,它会返回false
backup和2012-07-23文件夹都不存在  
这里有什么不正确的?