summaryrefslogtreecommitdiffstats
path: root/styling/StyleChecker.java
diff options
context:
space:
mode:
authorrsiddharth <rsiddharth@ninthfloor.org>2012-06-23 22:44:40 +0530
committerrsiddharth <rsiddharth@ninthfloor.org>2012-06-23 22:44:40 +0530
commit8bcd7f58acd38f5d5e1731f89be4a10a79d0fdb7 (patch)
tree6c1d4dfc97d77230ecf95d4e0f8b4fe1cde5b739 /styling/StyleChecker.java
scruf is "bzr"ed now.
Diffstat (limited to 'styling/StyleChecker.java')
-rw-r--r--styling/StyleChecker.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/styling/StyleChecker.java b/styling/StyleChecker.java
new file mode 100644
index 0000000..4905f25
--- /dev/null
+++ b/styling/StyleChecker.java
@@ -0,0 +1,20 @@
+package scruf.styling;
+
+import scruf.io.*;
+import java.io.*;
+public class StyleChecker {
+ private File styleSheet;
+ private File curDir;
+ private String styleContent;
+
+ public void resolve(File curDir) {
+ this.curDir = curDir.getAbsoluteFile();
+ styleSheet = new File(curDir,"style.css");
+ // if style shee doesn't exists, copy default sheet
+ // to the directory.
+ if(!styleSheet.exists()) {
+ styleContent = new ReadFile(new File("scruf/styling/style.css")).getContent();
+ new WriteFile(styleSheet,styleContent).write();
+ }
+ }
+} \ No newline at end of file