Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Commenting out blocks of code that are not used.

  • Loading branch information...
commit 4ea2878d84e0af47bc1263451d1b4cb35bed505f 1 parent 25ded3f
@Gozala authored
Showing with 7 additions and 5 deletions.
  1. +7 −5 lib/fs.js
View
12 lib/fs.js
@@ -9,8 +9,8 @@ const { Cc, Ci, components: { Constructor: CC } } = require("chrome");
// `Namespace` declared by E4X so `const` fails.
let { Namespace } = require("./namespace");
-const ioService = CC("@mozilla.org/network/io-service;1", "nsIIOService")();
-const ioUtils = CC("@mozilla.org/io-util;1", "nsIIOUtil")();
+// const ioService = CC("@mozilla.org/network/io-service;1", "nsIIOService")();
+// const ioUtils = CC("@mozilla.org/io-util;1", "nsIIOUtil")();
const RawFile = CC("@mozilla.org/file/local;1", "nsILocalFile",
"initWithPath");
@@ -20,8 +20,8 @@ const FileInputStream = CC("@mozilla.org/network/file-input-stream;1",
"nsIFileInputStream", "init");
const StreamCopier = CC("@mozilla.org/network/async-stream-copier;1",
"nsIAsyncStreamCopier", "init");
-const StringStream = CC("@mozilla.org/io/string-input-stream;1",
- "nsIStringInputStream", "setData");
+// const StringStream = CC("@mozilla.org/io/string-input-stream;1",
+// "nsIStringInputStream", "setData");
const BinaryInputStream = CC("@mozilla.org/binaryinputstream;1",
"nsIBinaryInputStream", "setInputStream");
@@ -29,7 +29,7 @@ const BinaryOutputStream = CC("@mozilla.org/binaryoutputstream;1",
"nsIBinaryOutputStream", "setOutputStream");
const StreamPump = CC("@mozilla.org/network/input-stream-pump;1",
"nsIInputStreamPump", "init");
-const StreamPipe = CC("@mozilla.org/pipe;1", "nsIPipe", "init");
+// const StreamPipe = CC("@mozilla.org/pipe;1", "nsIPipe", "init");
const { createOutputTransport, createInputTransport } =
CC("@mozilla.org/network/stream-transport-service;1",
@@ -87,12 +87,14 @@ function defer(wrapped) {
function getFileName(file) {
return file.QueryInterface(Ci.nsIFile).leafName;
}
+/*
function getFileURI(file) {
return ioService.newFileURI(file);
}
function getFileChannel(file) {
return ioService.newChannelFromURI(getFileURI(file));
}
+*/
function remove(path, recursive) {
return new RawFile(path).remove(recursive || false);
}
Please sign in to comment.
Something went wrong with that request. Please try again.