summaryrefslogtreecommitdiffstats
path: root/index
diff options
context:
space:
mode:
authorrsiddharth <rsiddharth@ninthfloor.org>2012-10-31 22:00:35 +0530
committerrsiddharth <rsiddharth@ninthfloor.org>2012-10-31 22:00:35 +0530
commit1f61844084d9e9383b3be04ff8f60c11eb628075 (patch)
tree069d147029f06b5a5e82b92a20c440ea3ab802ec /index
parent0019988533c9c1b2a4bfad50b3e0427babefb1bb (diff)
modified:
conversion/ConvertDirectory.java (minor edit) index/IndexCreator.java (removed code which (1) creates a index file, if it is not present (2) checks for the existence of index.html) io/WriteFile.java (made the stdout message more verbose) parsers/Header.java ('scruf' footer links to scruf's project page) todo (1 task completed)
Diffstat (limited to 'index')
-rw-r--r--index/IndexCreator.java19
1 files changed, 1 insertions, 18 deletions
diff --git a/index/IndexCreator.java b/index/IndexCreator.java
index f86f03a..ef683f7 100644
--- a/index/IndexCreator.java
+++ b/index/IndexCreator.java
@@ -39,13 +39,6 @@ public class IndexCreator {
if(index.exists()) {
indexContent.append(new ReadFile(index).
getContent());
- }else {
- try {
- index.createNewFile();
- }catch(IOException e) {
- throw new RuntimeException("Unable to create file: "+
- index.getAbsolutePath(),e);
- }
}
}
public void add(File file) {
@@ -61,19 +54,9 @@ public class IndexCreator {
}
}
public boolean shouldConvert() {
- // we assume that index.html exists.
- boolean indexHTMLExists=true;
if(modified)
new WriteFile(index,indexContent.toString()).write();
- // Check for this existence of index.html.
- if(!(new File(directory,"index.html").exists())) {
- indexHTMLExists=false;
- }
- /**
- * returns true either when 'index' is modified or
- * when index.html does not exists.
- */
- return (modified || !indexHTMLExists);
+ return (modified);
}
public File indexFile() {
return index;