tags:

views:

24

answers:

1

I would like to know how to create folder in c++ for asp.net

System::IO::IsolatedStorage::IsolatedStorageFile isoFile = IsolatedStorageFile::GetStore( static_cast<IsolatedStorageScope>(IsolatedStorageScope::User);

isoFile->CreateDirectory()

I have created windows form in c++ with a button. When I click on the button it should take a path as input and create a folder.

eg.

private: System::Void button2_Click(System::Object^  sender, System::EventArgs^  e) {

     }

This is not working. I do not want to use <boost/filesystem.hpp>. Please let me know how I could do this.

+1  A: 

You need to call Directory.CreateDirectory, like this:

System::IO::Directory::CreateDirectory(path);
SLaks