/ Published in: ActionScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// search through each file for each (var $file : File in _dataArray) { if (_fs != null) _fs.close(); _fs = new FileStream(); // read the file content _fs.open($file, FileMode.READ); var data : String = _fs.readUTFBytes(_fs.bytesAvailable); _fs.close(); // replace the current content with the new _fs = new FileStream(); _fs.open($file, FileMode.WRITE); data = data.split($searchString).join($replaceString); _fs.writeUTFBytes(data); _fs.close(); }