getcwd()
Get the name of the current working directory
Synopsis:
#include <unistd.h> char* getcwd( char* buffer, size_t size );
Since:
BlackBerry 10.0.0
Arguments:
- buffer
- NULL, or a pointer to a buffer where the function can store the directory name.
- size
- The size of the buffer, in bytes.
Library:
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
Description: it.
Returns:
The address of the string containing the name of the current working directory, or NULL if an error occurred ( errno is set).
Errors:
- EINVAL
- The argument size is negative or 0.
- ELOOP
- Too many levels of symbolic links.
- ENOSYS
- The getcwd() function isn't implemented for the filesystem specified in the current working directory.
- ERANGE
- The buffer is too small (as specified by size) to contain the name of the current working directory.
Examples:
.
Classification:
Last modified: 2014-06-24
Got questions about leaving a comment? Get answers from our Disqus FAQ.comments powered by Disqus