为什么不能自动生成log文件夹下面的aaa文件呢?  手动创建log文件夹就可以生成aaa.
    File writefile;
    String filepath,filecontent
    String readStr="";public void writefile(String path,String content,boolean append)     
    {
     try
     {
      boolean addStr=append; //通过这个对象来判断是否向文本文件中追加内容
      filepath=path;       //得到文本文件的路径
      filecontent=content; //需要写入的内容
      writefile=new File(filepath);
      if(writefile.exists()==false)    //如果文本文件不存在则创建它 
      {
          writefile.createNewFile();    
          writefile=new File(filepath);  //重新实例化
      }
      FileWriter filewriter=new FileWriter(writefile,addStr);
      filewriter.write(filecontent);
      filewriter.flush();
      filewriter.close();
     }catch(Exception d){System.out.println(d.getMessage());}
    }
=====================================================
我的测试语句:OP_File o=new OP_File();
o.writefile("log/aaa.txt","\n数据库完成于XX",true);