1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-19 21:15:46 +01:00

ex parser for use with .vimperatorrc, the command line and other sourced files. sourced files are no longer javascript code, but can use the new :javascript ex command to execute javascript. :javascript also supports multiline with heredocs (:js <<EOF). File completion for the :source command.

This commit is contained in:
Viktor Kojouharov
2007-04-22 14:17:28 +00:00
parent 6322db0107
commit 3ddfb11add
6 changed files with 179 additions and 54 deletions

View File

@@ -129,6 +129,19 @@ function fo_write(buf)
LocalFile.prototype.read =
function fo_read(max)
{
if (this.localFile.isDirectory())
{
var entries = this.localFile.directoryEntries;
var array = [];
while(entries.hasMoreElements())
{
var entry = entries.getNext();
entry.QueryInterface(Components.interfaces.nsIFile);
array.push(entry);
}
return array;
}
if (!("inputStream" in this))
throw "file not open for reading.";