Click here to Skip to main content
15,893,594 members
Home / Discussions / C#
   

C#

 
GeneralRe: Checking if string path is valid Pin
Saksida Bojan6-Mar-10 3:54
Saksida Bojan6-Mar-10 3:54 
AnswerRe: Checking if string path is valid Pin
AspDotNetDev6-Mar-10 2:56
protectorAspDotNetDev6-Mar-10 2:56 
GeneralRe: Checking if string path is valid Pin
Saksida Bojan6-Mar-10 3:17
Saksida Bojan6-Mar-10 3:17 
AnswerRe: Checking if string path is valid Pin
PIEBALDconsult6-Mar-10 3:17
mvePIEBALDconsult6-Mar-10 3:17 
GeneralRe: Checking if string path is valid Pin
Saksida Bojan6-Mar-10 3:31
Saksida Bojan6-Mar-10 3:31 
GeneralRe: Checking if string path is valid Pin
PIEBALDconsult6-Mar-10 16:15
mvePIEBALDconsult6-Mar-10 16:15 
AnswerRe: Checking if string path is valid Pin
Eddy Vluggen6-Mar-10 3:21
professionalEddy Vluggen6-Mar-10 3:21 
GeneralRe: Checking if string path is valid Pin
Saksida Bojan6-Mar-10 3:36
Saksida Bojan6-Mar-10 3:36 
I used like This: (From Memory)

String path = "c:\TempCacheFolder";
Directory.CreateDirectory(path);
Directory.RemoveDirectory(path);


I needed to know if imputed string is valid before creating. I am currently designing Cache Engine for my custom control. The property CacheFilePath has get and set property. When someone programaticly enter an invalid area where it can't be written, without actually creating it before it is needed. And there is error within my approach. If I create directory with a path that have more subfolder that doesn't exsist:

Example:
Faze1. Test Create a folder.
C:\MyApp\UnkownFolder\Unkownfolder2\TempImageCache.
Faze2. Remove Folder. (Will remove only TempImageCache)

I wan't to avoid this needless step. I only wan't to validate, that the unknown directory can be created without actually creating before needing.

I am sorry if I was too cryptic about my previous posts

Eddy Vluggen wrote:
In order to verify whether "MyBla:Folder" is a valid name?

More like if it can create without creating new folder. I am designing custom control (Currently Cache Engine) I intend to handle it without trusting user input. And return errors that the user (developer) can easily repair problem
AnswerRe: Checking if string path is valid Pin
Luc Pattyn6-Mar-10 4:30
sitebuilderLuc Pattyn6-Mar-10 4:30 
GeneralRe: Checking if string path is valid Pin
Saksida Bojan6-Mar-10 10:58
Saksida Bojan6-Mar-10 10:58 
AnswerRe: Checking if string path is valid Pin
RichardM16-Mar-10 7:54
RichardM16-Mar-10 7:54 
AnswerRe: Checking if string path is valid Pin
Giorgi Dalakishvili6-Mar-10 10:09
mentorGiorgi Dalakishvili6-Mar-10 10:09 
QuestionDefault Code view. Pin
Saksida Bojan5-Mar-10 23:11
Saksida Bojan5-Mar-10 23:11 
AnswerRe: Default Code view. Pin
1.21 Gigawatts5-Mar-10 23:29
1.21 Gigawatts5-Mar-10 23:29 
GeneralRe: Default Code view. Pin
Saksida Bojan5-Mar-10 23:48
Saksida Bojan5-Mar-10 23:48 
GeneralRe: Default Code view. Pin
1.21 Gigawatts5-Mar-10 23:52
1.21 Gigawatts5-Mar-10 23:52 
GeneralRe: Default Code view. Pin
Luc Pattyn6-Mar-10 4:32
sitebuilderLuc Pattyn6-Mar-10 4:32 
GeneralRe: Default Code view. Pin
1.21 Gigawatts6-Mar-10 6:15
1.21 Gigawatts6-Mar-10 6:15 
QuestionZip Folders and Files Pin
Anil Kumar.Arvapalli5-Mar-10 21:38
Anil Kumar.Arvapalli5-Mar-10 21:38 
AnswerRe: Zip Folders and Files Pin
OriginalGriff5-Mar-10 21:40
mveOriginalGriff5-Mar-10 21:40 
AnswerRe: Zip Folders and Files [modified] Pin
1.21 Gigawatts5-Mar-10 21:40
1.21 Gigawatts5-Mar-10 21:40 
GeneralRe: Zip Folders and Files Pin
harold aptroot5-Mar-10 21:53
harold aptroot5-Mar-10 21:53 
GeneralRe: Zip Folders and Files Pin
1.21 Gigawatts5-Mar-10 21:54
1.21 Gigawatts5-Mar-10 21:54 
AnswerRe: Zip Folders and Files Pin
StarBP6-Mar-10 11:20
StarBP6-Mar-10 11:20 
QuestionExport Registry Pin
Anil Kumar.Arvapalli5-Mar-10 21:36
Anil Kumar.Arvapalli5-Mar-10 21:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.