openFile is locking file access

I am using openFile and filestreams to successfully modify XML files.

However, I cannot get Max to release control of these files on a system level once they have been modified without closing max.

Not a huge deal, but if i would like to edit any of these recently modified XML files in a text editor, I have to close Max.

I flush and close the filestream when my script is through.

Some of the openFile modes are vague to me ("S", "R", "T", "D", "c" and "n"), I wonder if that's my problem.

Any suggestions?

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vasilescu_anton's picture

That's because your file is

That's because your file is still open in max's memory. Once you close max you terminate the connection. The way to do it is using the "close <filestream>" command to flush the memory and close the file.

One other way to force closing is using "gc()" which clears all memory.

abyjoe's picture

i am having a similar

i am having a similar problem... any ideas??? please reply

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.