GETCWD(OC)
Shore Programmer's Manual - 3 November 94
NAME
getcwd \- get pathname of current working directory
SYNOPSIS
#include <ShoreApp.h>
shrc Shore::getcwd(char *buf, int bufsize);
DESCRIPTION
Getcwd
copies the current process' working directory into the buffer given by
buf.
At most
bufsize
characters are copied. The resulting string is null-terminated only if the
length of the returned string is less than that of the buffer. Note that
Shore applications have two working directories: the UNIX directory and the
Shore directory. This function returns the latter. The former can be
retrieved with
getcwd(3).
Note also that some UNIX versions will allocate a buffer if the
buf
parameter is 0. This method does not allocate a buffer.
The current working directory of a process can be changed with chdir(oc)
(to change the Shore working directory) or chdir(2) (to change the UNIX
working directory).
BUGS
Getcwd
is implemented by tracing a path from the current directory back to the
root of the Shore file system. In the current release of Shore, this
operation acquires SH-mode (share-mode) locks on each directory on this
path.
VERSION
This manual page applies to Version 0.1 of theShore software.
SPONSORSHIP
The Shore project is sponsored by the Advanced Research Project Agency, ARPA order number 018 (formerly 8230), monitored by the U.S. Army Research Laboratory under contract DAAB07-91-C-Q518.
COPYRIGHT
Copyright (c) 1994 Computer Sciences Department, University of Wisconsin -- Madison. All Rights Reserved.SEE ALSO
chdir(oc)
,
chdir(2),
getcwd(3).