opensubscriber
   Find in this group all groups
 
Unknown more information…

x : xul-talk@lists.sourceforge.net 19 April 2007 • 12:13AM -0400

[xul-interop] How to Remove file ?
by salah

REPLY TO AUTHOR
 
REPLY TO GROUP







Hi everyone , :)
I try removing /home/user/file.txt file using code bellow but it doesn't
work can any one help me

______________________________________________________________________
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
    id="findfile-window"
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    <script>
        function delFile() {
            var aFile =
Components.classes["@mozilla.org/file/local;1"].createInstance();
            if ( aFile instanceof Components.interfaces.nsILocalFile) {
                aFile.initWithPath("/home/user/file.txt");
                aFile.remove(false);
            }
        }
    </script>
    <button label="Button 1" oncommand="delFile();"/>
</window>
___________________________________________________________________________________
--
View this message in context: http://www.nabble.com/How-to-Remove-file---tf3601735.html#a10061119
Sent from the XUL - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
XUL News Wire      - http://xulnews.com
XUL Job Postings   - http://xuljobs.com
Open XUL Alliance - http://xulalliance.org  
_______________________________________________
xul-talk mailing list
xul-talk@list...
https://lists.sourceforge.net/lists/listinfo/xul-talk

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.