|
From: Geoff H. <gh...@la...> - 2003-08-18 21:05:05
|
I am developing a macro to traverse through a directory, open all the files and then run some search and replace reg ex stuff. That all runs fine. What's frustrating is I can't seem to figure out how to save and close each file after the above runs. Saving: I tried this: buffer.save(view,null,true); // but this just gives me a big old dialog asking where to save the buffer // I thought, from reading the API docs, this would save the current buffer overwriting the existing file of the // same name in its original directory I also tried this: String thisPath = subDirPath + "/" + subDirContents[i]; Macros.message(view,subDirPath + "/" + subDirContents[i]); buffer.save(view,thisPath,true); // The message shows the right path to the file but overwrites it with the text that was // in the "untitled" buffer or in other words nothing. I am having similar problems with jEdit.closeBuffer(view,buffer); Go easy on me, I'm not much f a java or beanshell coder yet. Thanks |