I'm calling XmlDocument.Save with a filename that often varies. It is
sometimes absolute path and sometimes relative path. Occasionally I'll
get a re-entrant save to the same filename, at which point
XmlDocument.Save throws an exception.
What is the right way to lock on a filename that may or may not be
relative?
Or is there a way to make XmlDocument.Save wait until the file is
available for writing?
Re: lock on filename for XmlDocument.Save? ... sometimes absolute path and sometimes relative path.... XmlDocument.Save with a filename attempts to open the file in Create mode for Writing with only Read sharing. ... if you don't really care that the second simultaneous Save is going to destroy the data from the first Save, you could just do a lock the XmlDocument.Save function call, which will enforce only one save at a time, or you could do a bit more complicated logic if you do care that you are overwriting an existing file, which will happen once the first Savecompletes. ... (microsoft.public.dotnet.languages.csharp)
Re: absolute path to relative path conversion ... you give as you are effectively just after the filename:... You could walk from you absolute path to the root of your drive and then ... walk down the path to your file, building the relative path as you go along. ... > Sorry for being so vague Rob... (microsoft.public.dotnet.languages.csharp)
Re: Need script to download file at known address ...Jeff Shannon wrote: ... > it accepts a pathname, rather than just a filename, so you can feed it ... > an absolute path like your example or a relative path ... ... (comp.lang.python)
Re: How does Require deal with multiple files of the same name in ...Jos van de Ven wrote: ... If a relative path is specified, there is at least one file in the ... Perhaps the same behaviour should take place when an absolute path is specified. ... If the variable is set to re-load then the first matching file ... (comp.lang.forth)