|
|
Eero Ahonen wrote:
> I don't want to turn this to flamewar, but what is a better mechanism to
> get same data readable from two different directories with the same
> filename?
Don't do that. :-)
> Should the data location be written to registry and checked by
> there before reading?
Exactly. Code the indirection into your program instead of littering the
file system with it. In other words, store the name of the file in two
places, rather than making it look like there's two files. Bump the
indirection up a level - indirect to find the file name, instead of
indirecting to find the data.
Or use a "shortcut", which gets automatically updated when you move the
"real" file somewhere else, even if it's someone moving a file on a network
share.
Sure, occasionally it's more of a PITA (especially in complex development
environments where the tools aren't necessarily sufficiently configurable),
but it tends to keep things cleaner in the long run, especially when you
realize that the Windows file systems are a forest, including trees not even
on your machine, for example.
--
Darren New, San Diego CA, USA (PST)
My fortune cookie said, "You will soon be
unable to read this, even at arm's length."
Post a reply to this message
|
|