Re: Hmm......
- From: "Peter Duniho" <NpOeStPeAdM@xxxxxxxxxxxxxxxx>
- Date: Wed, 14 May 2008 09:38:47 -0700
On Wed, 14 May 2008 02:29:19 -0700, Shobhit <Thapliyal> wrote:
[...]
I have a string with me and I want to know if it represents a valid file name or a directory name. Hoever, even before that, I need to validate that string by assertig that this given damn string is indeed a potentially valid one (for File as well as for Directory).
What is it with today that has brought all the context-less posters?
As Jon says, you are posting a brand new thread, without quoting or otherwise referencing any other previous article. We have practically no idea what you're talking about.
That said, as far as validating a path, it's not possible to do without actually trying to use it. Different filesystems have different rules, and what's valid in one filesystem may not be valid in another. There's no single set of rules that can be applied to a string to inform you whether it's a valid path.
Pete
.
- References:
- Hmm......
- From: Shobhit Thapliyal
- Hmm......
- Prev by Date: Re: Best Way to Test Against a Database
- Next by Date: Re: How to find if Application has Focus
- Previous by thread: Re: Hmm......
- Next by thread: Dynamic Casting in CSharp
- Index(es):
Relevant Pages
|