Unfortunately, your question is based on some misconceptions on what file systems do (actually, as well as your previous question). Please see my comments to the question.
Several different classes and methods are involved, depending on what you are going to do with the file. First of all,
System.IO.File
:
http://msdn.microsoft.com/en-us/library/system.io.file.aspx[
^].
Now, opening a file at the level of
System.IO.StreamReader
,
System.IO.StreamWriter
, or
System.IO.BinaryReader
. These classes are most practical and robust in use. Please see:
http://msdn.microsoft.com/en-us/library/vstudio/system.io.streamreader[
^],
http://msdn.microsoft.com/en-us/library/vstudio/system.io.streamwriter[
^],
http://msdn.microsoft.com/en-us/library/vstudio/system.io.binaryreader[
^],
http://msdn.microsoft.com/en-us/library/vstudio/system.io.binarywriter[
^].
And also you can open the file with the
System.IO.FileStream
:
http://msdn.microsoft.com/en-us/library/system.io.filestream.aspx[
^].
I am not sure it can help you, unless you finally learn what file systems do and get the basic concepts. It's hard to help someone who is aiming to "open" a directory. Perhaps, you misconception is related to your observation of some software application which "open" the directory visually, but it's very important to sort out UI from what happens behind it.
—SA