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:
@@ -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.";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user