Functions
core/vpl/vpl.h File Reference

Access to certain POSIX functions. More...

#include <vcl_cstddef.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 mode)
 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.
int vpl_putenv (const char *envvar)
 Set environment variable.
unsigned vpl_getpid ()
 Get the process identifier.
int vpl_gethostname (char *name, vcl_size_t len)
 Get the current machine's hostname.

Detailed Description

Access to certain POSIX functions.

Definition in file vpl.h.


Function Documentation

int vpl_chdir ( const char *  dir)

Change the working directory to dir.

Definition at line 35 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 17 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 69 of file vpl.cxx.

int vpl_mkdir ( const char *  dir,
unsigned short  mode 
)

Create a new directory dir with permissions mode.

Definition at line 23 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 79 of file vpl.cxx.

int vpl_rmdir ( const char *  dir)

Remove the directory dir.

Definition at line 29 of file vpl.cxx.

unsigned int vpl_sleep ( unsigned int  t)

Sleep for t seconds.

Definition at line 47 of file vpl.cxx.

int vpl_unlink ( const char *  file)

Remove the file file.

Definition at line 41 of file vpl.cxx.

int vpl_usleep ( unsigned int  t)

Sleep for t microseconds.

Definition at line 53 of file vpl.cxx.