rem: case "w": 
add: case "w": 
context: open : function(path, setMode){    if(!setMode)        setMode="r";switch(setMode){case "w":    //dump("open file for writing\n\n");    if(!path || !setMode){        dump("Missing path or mode in arguments . . .\n\n");        return;    }    try{        //dump("Closing any existing handles . . . \n\n");        this.close();        this.fileInst           = new FilePath( path );        var fileExists          = this.exists( path );    if(fileExists){        //dump("deleting old file and creating a new one . . . \n\n");         this.fileInst["delete"](false);        fileExists=false;    }    if (!fileExists){        //dump("\n\nCreating new file "+path+"\n\n");        this.fileInst.create(0, 0644);        fileExists=true;    }    this.mode=8;    return;    }    catch (error){ dump("**** ERROR:"+error+"\n\n"); }    break;case "a":    //dump("open file for appending\n\n");    if(!path || !setMode){        dump("Missing path or mode in arguments . . .\n\n");        return;    }    try{        //dump("Closing any existing handles . . . \n\n");        this.close();        this.fileInst           = new FilePath(path);        var fileExists          = this.exists(path);    if ( !fileExists ){        //dump("\n\nCreating new file "+path+"\n\n");        this.fileInst.create(0, 0644);        fileExists=true;    }   this.mode=16;   return;    }    catch (error){ dump("**** ERROR:"+error+"\n\n"); }    break;case "r":    //dump("open file for reading\n\n");    if(!path){        dump("Missing path argument . . . \n\n");        return;    }    //dump("Closing any existing handles . . . \n\n");    this.close();    try {        this.fileInst                = new FilePath(path);        this.fileChannel             = new FileChannel();        this.inputStream             = new InputStream();        }            catch (error){ dump("**** ERROR:"+error+"\n\n"); }    break;    default:    dump("\n\n**** WARNING: \""+setMode+"\" is an Invalid file mode\n\n");    }},
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/46e7c638c4651d5af5b1ea9556848414e43314af/io.js/buggy/xpcom/tests/utils/io.js