SOL9 2.0 Sample: Directory

SOL9 2.0 Samples

1 Screenshot


2 Source code

/*
 * Directory.cpp 
 * Copyright (c) 2009 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED. 
 */



#include <sol\Directory.h>

class TestDirectory {

public:
    void make(const TCHAR* dir) {

    Directory directory;

    if (GetFileAttributes(dir) != 0xffffffff) {
        _tprintf(_T("Already exists %s\n"), dir);
        return;
    }

    try {

        BOOL rc = directory.make(dir, NULL);
        if (rc) {
            _tprintf(_T("Created a new dir= [%s]\n"), dir);
        } else {
            _tprintf(_T("Failed to created a new dir= [%s]\n"), dir);

        }

    } catch (Exception& ex) {

    } catch (...) {

    }
}
};

void _tmain(int argc, TCHAR* argv[])
{
    TestDirectory tester;


    tester.make(_T("C:\\TEST\\BB"));
    tester.make(_T("C:\\TEST\\BB\\C  C\\DD DD DD\\1234567890 ABCDEFGHIJILM"));

    tester.make(_T("C:\\TEST\\!#$%&'()=~[]"));

    tester.make(_T("C:\\TEST\\<>?_{}`+-|"));
    tester.make(_T("Z:\\TEST\\A\\BB\\CCC"));

    tester.make(_T("C:\\TEST\\•\ަ\\AA\\BB\\CC\\•\ަ\\DD"));

}

Last modified: 11 Nov 2009

Copyright (c) 2009 Antillia.com ALL RIGHTS RESERVED.