Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2011 IBM Corporation and others. |
2 |
* Copyright (c) 2011, 2013 IBM Corporation and others. |
3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
Lines 38-43
Link Here
|
38 |
} |
38 |
} |
39 |
|
39 |
|
40 |
public boolean createNewFile() throws IOException { |
40 |
public boolean createNewFile() throws IOException { |
|
|
41 |
File directory = this.indexFile.getParentFile(); |
42 |
if ((directory != null) && !directory.exists()) { |
43 |
directory.mkdirs(); |
44 |
} |
45 |
// always call File#createNewFile() so that the IOException is thrown if there is a failure |
41 |
return this.indexFile.createNewFile(); |
46 |
return this.indexFile.createNewFile(); |
42 |
} |
47 |
} |
43 |
|
48 |
|