On 18 Jun 2010, at 01:01, Tom Rutter <[email protected]> wrote:

The time in fact can vary. Some times it can be a few seconds and other times it may be 10s of minutes. I would hate it as a user if i make a request and then 5 minutes later i get told that the directory path i provided as input is bad. I prefer to get told that up front

You could:

1. Allow the user to select a root folder that exists - the user would pre-create any required subfolders - they have suitable access at this time.

2. Do the work.

3. Write output file(s), creating any sub-folder if needed.

4. If 3 fails, write to System.IO.GetTempPath() and prompt the user for a solution.

This assumes user interaction is desirable and the output files can be stores in memory rather than created in the fly.


On 17 June 2010 14:12, Tom Rutter <[email protected]> wrote:
Mainly because of design I guess. I have a function that uses the folder path way down the line someplace after a lot of other work has been done, so i dont want to do lots of stuff and then find out the folder path i was given cant be used now.



Can I please get some recommendations on how to check if a directory can be created given a path if it already doesnt exist?

--
Richard Carde

Reply via email to