-
Notifications
You must be signed in to change notification settings - Fork 1
/
readlink.h
34 lines (28 loc) · 1006 Bytes
/
readlink.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/// \file
/// \brief Declaration of readlink(2) wrappers
///
/// Copyright (c) 2009 Ross Tyler.
/// This file may be copied under the terms of the
/// GNU Lesser General Public License (LGPL).
/// See COPYING file for details.
#ifndef readlink_h
#define readlink_h
#include <boost/shared_ptr.hpp>
#include "Exception.h"
boost::shared_ptr<char const> readlink(
char const * link) ///< The link to read
throw (Exception::Error)
/// \return The value of the read link
/// \throw Exception::Error If the link cannot be read
/// \brief Like readlink(2) except the result is returned in a smart pointer
/// or an exception is thrown.
;
boost::shared_ptr<char const> readlink(
int fd) ///< The file descriptor whose path to return
throw (Exception::Error)
/// \return The path to the object referenced by the file descriptor
/// \throw Exception::Error If the path cannot be determined
/// \brief Return the path to the object referenced by the file descriptor
/// or throw an exception.
;
#endif