home *** CD-ROM | disk | FTP | other *** search
- class com.neodelight.mdm.MdmFile
- {
- var bufferPath;
- var bufferOut;
- var f;
- function MdmFile(action, path, data)
- {
- if(action === "append")
- {
- _root.stdout += "worker..\n";
- this.bufferPath = path;
- this.bufferOut = data;
- this.delayedAppend.parent = this;
- _global.mdm.fileexists(path,this.delayedAppend);
- }
- }
- static function save(path, data)
- {
- data = com.neodelight.std.XString.replace(",","@c@",data);
- _global.mdm.savetofile(path,data);
- }
- static function append(path, dat)
- {
- _root.stdout += "append()\n";
- dat = com.neodelight.std.XString.replace(",","@c@",dat);
- var _loc3_ = new com.neodelight.mdm.MdmFile("append",path,dat);
- }
- function delayedAppend(fileExists)
- {
- var _loc4_ = this.f.parent.bufferPath;
- var _loc5_ = this.f.parent.bufferOut;
- _root.stdout += " delayedAppend(): fileExists=" + fileExists + ", bufferPath=" + _loc4_ + ", bufferOut=" + _loc5_ + "\n";
- _root.stdout += com.neodelight.std.XString.dump(this,{depth:2});
- if(fileExists == "true")
- {
- _global.mdm.appendtofile(_loc4_,_loc5_);
- }
- else
- {
- _global.mdm.savetofile(_loc4_,_loc5_);
- }
- }
- }
-