Back to index

lightning-sunbird  0.9+nobinonly
Functions
direct.cpp File Reference
#include "mozce_internal.h"

Go to the source code of this file.

Functions

MOZCE_SHUNT_API int mozce_mkdir (const char *inDirname)
MOZCE_SHUNT_API int mozce_rmdir (const char *inDirname)

Function Documentation

MOZCE_SHUNT_API int mozce_mkdir ( const char *  inDirname)

Definition at line 50 of file direct.cpp.

{
    MOZCE_PRECHECK

#ifdef DEBUG
    mozce_printf("mozce_mkdir called\n");
#endif
    
    int retval = -1;
    
    if(NULL != inDirname)
    {
        unsigned short wDirname[MAX_PATH];
        
        if(0 != a2w_buffer(inDirname, -1, wDirname, sizeof(wDirname) / sizeof(unsigned short)))
        {
            if(FALSE != CreateDirectoryW(wDirname, NULL))
            {
                retval = 0;
            }
        }
    }
    
    return retval;
}

Here is the call graph for this function:

MOZCE_SHUNT_API int mozce_rmdir ( const char *  inDirname)

Definition at line 77 of file direct.cpp.

{
    MOZCE_PRECHECK

#ifdef DEBUG
    mozce_printf("mozce_rmdir called (%s)\n", inDirname);
#endif
    
    int retval = -1;
    
    if(NULL != inDirname)
    {
        unsigned short wDirname[MAX_PATH];
        
        if(0 != a2w_buffer(inDirname, -1, wDirname, sizeof(wDirname) / sizeof(unsigned short)))
        {
            if(FALSE != RemoveDirectoryW(wDirname))
            {
                retval = 0;
            }
        }
    }
    
    return retval;
}

Here is the call graph for this function: