Skip to content

有段代码有些疑问 #3

Description

@GoogleCodeExporter
--------------------------------------------------------------------
public FSQueue(String dir, int fileLimitLength) throws Exception {
        this.fileLimitLength = fileLimitLength;
        File fileDir = new File(dir);
        if (fileDir.exists() == false && fileDir.isDirectory() == false) {
            if (fileDir.mkdirs() == false) {
                throw new IOException("create dir error");
            }
        }
---------------------------------------------------------------------

问题:如果dir是一个已经存在的文件路径,如“E:/a/b.txt”;�
��么就会有问题!抛出
“java.io.IOException: 系统找不到指定的路径。”

Original issue reported on code.google.com by kehan201...@gmail.com on 1 Dec 2011 at 5:10

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions