Symbolic Link - Mozilla

This is a discussion on Symbolic Link - Mozilla ; Is it possible to create a symbolic link through a Firefox extension? We can create files and folders but I haven't found a method for creating symlinks in MDC yet....

+ Reply to Thread
Results 1 to 4 of 4

Thread: Symbolic Link

  1. Symbolic Link

    Is it possible to create a symbolic link through a Firefox extension?
    We can create files and folders but I haven't found a method for
    creating symlinks in MDC yet.


  2. Re: Symbolic Link

    That makes sense. Thanks for the feedback.

  3. Re: Symbolic Link

    On Oct 7, 9:03*pm, isnw wrote:
    > Is it possible to create a symbolic link through a Firefox extension?
    > We can create files and folders but I haven't found a method for
    > creatingsymlinksin MDC yet.


    you can do it through a shell script

    --------------------------------

    var shell = "/bin/sh";

    var file = Components.classes["@mozilla.org/file/local;1"]
    .createInstance(Components.interfaces.nsILocalFile );

    file.initWithPath(shell);


    var process = Components.classes["@mozilla.org/process/util;1"]
    .createInstance(Components.interfaces.nsIProcess);

    process.init(file);

    -------------------

    found at http://forums.mozillazine.org/viewto...?f=19&t=663377

  4. Re: Symbolic Link

    On Oct 15, 4:21*am, slotboxed wrote:
    > On Oct 7, 9:03*pm, isnw wrote:
    >
    > > Is it possible to create a symbolic link through a Firefox extension?
    > > We can create files and folders but I haven't found a method for
    > > creatingsymlinksin MDC yet.

    >
    > you can do it through a shell script
    >
    > --------------------------------
    >
    > var shell = "/bin/sh";
    >
    > var file = Components.classes["@mozilla.org/file/local;1"]
    > * * * * * * *.createInstance(Components.interfaces.nsILocalFil e);
    >
    > file.initWithPath(shell);
    >
    > var process = Components.classes["@mozilla.org/process/util;1"]
    > * * * * * * * * * * .createInstance(Components.interfaces.nsIProcess);
    >
    > process.init(file);
    >
    > -------------------
    >
    > found athttp://forums.mozillazine.org/viewtopic.php?f=19&t=663377


    oops, missed the last two lines of code:

    var args = ["path/to/script","arg1","arg2","etc"];

    process.run(false, args, args.length);

+ Reply to Thread