projects
/
app.Builder.js
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2748e60
)
File.js
author
Alan Knowles
<alan@akbkhome.com>
Thu, 6 Oct 2011 07:17:49 +0000
(15:17 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Thu, 6 Oct 2011 07:17:49 +0000
(15:17 +0800)
File.js
patch
|
blob
|
history
diff --git
a/File.js
b/File.js
index
0068ca3
..
c2b5f9f
100644
(file)
--- a/
File.js
+++ b/
File.js
@@
-61,7
+61,19
@@
var File = {
}
return out;
},
-
+
+ dirname : function(s)
+ {
+ var ar = s.split(File.SEPARATOR);
+ ar.pop();
+ return ar.join(File.SEPARATOR);
+ },
+ basename : function(s)
+ {
+ var ar = s.split(File.SEPARATOR);
+ return ar.pop();
+ },
+
read : function (path) {
var out = {};
GLib.file_get_contents(path, out, null, null);