Hello,
I create a file using FileInfo by :
NewFile = new FileInfo(FileName);
and I got a parameter which tells me in which folder I need to place it
on my filesystem.
How can I implement it on C# if I am getting _folderName and by using
FileInfo instance ?
Thank u!
Ignacio Machin ( .NET/ C# MVP ) - 07 Feb 2008 18:17 GMT
Hi,
I do not understand what you need. If you are provided with a path and you
need to create a file you can use several ways to do that:
FileStream( path_supplied + "\\" + myfilename);
StreamWriter( path_supplied + "\\" + myfilename);

Signature
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
>
> Hello,
[quoted text clipped - 10 lines]
>
> *** Sent via Developersdex http://www.developersdex.com ***
zacks@construction-imaging.com - 07 Feb 2008 18:49 GMT
> Hello,
>
[quoted text clipped - 5 lines]
> How can I implement it on C# if I am getting _folderName and by using
> FileInfo instance ?
It's news to me that the FileInfo Class can create a new file. From my
understanding, it only works with an existing file to obtain the file
properties of the file.
Family Tree Mike - 07 Feb 2008 18:54 GMT
FileInfo does not create the file if it does not exist. Did I misunderstand
your first statement?
If you want a full path based on _foldername and FileName, use
Path.Combine(_foldername, FileName).
> Hello,
>
[quoted text clipped - 9 lines]
>
> *** Sent via Developersdex http://www.developersdex.com ***