Changeset 295 in dev for trunk/jenga


Ignore:
Timestamp:
Aug 22, 2007, 11:23:41 PM (17 years ago)
Author:
dai_9181
Message:
 
Location:
trunk/jenga
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/jenga/include/common/Directory.h

    r166 r295  
    1919    string path;
    2020public:
    21     Directory( const string &path )
    22         : path( path )
    23     {
    24     }
     21    Directory( const string &path, bool isMake = false );
    2522
    2623    string GetFullPath( const string &relationPath );
  • trunk/jenga/src/common/Directory.cpp

    r166 r295  
    11#include <boost/foreach.hpp>
    22#include <jenga/include/common/Directory.h>
     3#include <jenga/include/common/Exception.h>
     4
     5#include <imagehlp.h>
    36
    47using namespace std;
    58using namespace Jenga::Common;
     9
     10Directory::Directory( const string &path, bool isMake )
     11    : path( path )
     12{
     13    if ( isMake )
     14    {
     15        if (!::MakeSureDirectoryPathExists(path.c_str()))
     16        {
     17            Jenga::Throw( "MakeSureDirectoryPathExists failed!" );
     18        }
     19    }
     20}
    621
    722string Directory::GetFullPath( const string &relationPath )
Note: See TracChangeset for help on using the changeset viewer.