Functions
core/vpl/os_win32/vpl.cxx File Reference
#include <sys/types.h>
#include <sys/stat.h>
#include <direct.h>
#include <io.h>
#include <process.h>
#include <windows.h>

Go to the source code of this file.

Functions

char * vpl_getcwd (char *buf, vcl_size_t buf_size)
 Get the pathname of the current working directory.
int vpl_mkdir (const char *dir, unsigned short)
 Create a new directory dir with permissions mode.
int vpl_rmdir (const char *dir)
 Remove the directory dir.
int vpl_chdir (const char *dir)
 Change the working directory to dir.
int vpl_unlink (const char *file)
 Remove the file file.
unsigned int vpl_sleep (unsigned int t)
 Sleep for t seconds.
int vpl_usleep (unsigned int t)
 Sleep for t microseconds.
unsigned vpl_getpid ()
 Get the process identifier.
int vpl_putenv (const char *envvar)
 Set environment variable.
int vpl_gethostname (char *name, vcl_size_t len)
 Get the current machine's hostname.

Function Documentation

int vpl_chdir ( const char *  dir)

Change the working directory to dir.

Definition at line 33 of file vpl.cxx.

char* vpl_getcwd ( char *  buf,
vcl_size_t  buf_size 
)

Get the pathname of the current working directory.

If buf is not NULL, then size must be at least 1 greater than the length of the pathname to be returned and the pathname will be stored in buf. If buf is NULL then the pathname will be returned and the returned pointer may be passed to free() by the caller.

See also: getcwd(3) manpage.

Definition at line 10 of file vpl.cxx.

int vpl_gethostname ( char *  name,
vcl_size_t  len 
)

Get the current machine's hostname.

Definition at line 86 of file vpl.cxx.

unsigned vpl_getpid ( )

Get the process identifier.

Definition at line 67 of file vpl.cxx.

int vpl_mkdir ( const char *  dir,
unsigned short   
)

Create a new directory dir with permissions mode.

Definition at line 16 of file vpl.cxx.

int vpl_putenv ( const char *  envvar)

Set environment variable.

Parameters:
envvarshould contain the environment variable name and value separated by an equals sign, e.g. "VARNAME=VALUE"

Definition at line 76 of file vpl.cxx.

int vpl_rmdir ( const char *  dir)

Remove the directory dir.

Definition at line 23 of file vpl.cxx.

unsigned int vpl_sleep ( unsigned int  t)

Sleep for t seconds.

Definition at line 53 of file vpl.cxx.

int vpl_unlink ( const char *  file)

Remove the file file.

Definition at line 43 of file vpl.cxx.

int vpl_usleep ( unsigned int  t)

Sleep for t microseconds.

Definition at line 60 of file vpl.cxx.