Create directory structure in CSharp

Description

The following code shows how to create directory structure.

Example


     //from  w w  w .  ja v  a2  s  .co  m



using System;
using System.IO.IsolatedStorage;
using System.IO;

  class MainClass
  {
    static void Main(string[] args)
    {
      using (IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForAssembly())
      {
        store.CreateDirectory(@"MyDir\XmlData");
        store.CreateDirectory("MyDir\\BinaryData");
        store.CreateDirectory("MyDir/TextData");
      }
    }
  }




















Home »
  C# Tutorial »
    IO »




File Attribute
File Security
Directory Attribute
Directory Recursive
Binary File
Text Field
Buffered IO
Create Copy Delete Move
CSV
Drive
File System Watcher
Isolated Storage
MemoryStream
Serialize
Zip