#include <unistd.h>
Go to the source code of this file.
|
DCLCAPI int | __access (const String &_path, int _type) |
DCLCAPI int | __chown (const String &_path, uid_t _owner, gid_t _group) |
DCLCAPI int | __lchown (const String &_path, uid_t _owner, gid_t _group) |
DCLCAPI int | __chdir (const String &_path) |
DCLCAPI int | __getcwd (String &_r) |
DCLCAPI int | __ttyname (int fd, String &_r) |
DCLCAPI int | __link (const String &_from, const String &_to) |
DCLCAPI int | __symlink (const String &_from, const String &_to) |
DCLCAPI ssize_t | __readlink (const String &_path, String &_r) |
DCLCAPI int | __unlink (const String &_path) |
DCLCAPI int | __rmdir (const String &_path) |
DCLCAPI int | __getlogin (String &_r) |
DCLCAPI int | __gethostname (String &r) |
DCLCAPI int | __getdomainname (String _r) |
DCLCAPI int | __truncate (const String &_path, off_t _len) |
◆ __DCL_UNISTD_H__
#define __DCL_UNISTD_H__ 20100119 |
◆ __access()
DCLCAPI int __access |
( |
const String & | _path, |
|
|
int | _type ) |
- Returns
- == NULL or -1, see errno
Definition at line 22 of file _unistd.cpp.
23{
25 return access(path, _type);
26}
#define STRTOMBS_ER(str, mbs)
◆ __chdir()
DCLCAPI int __chdir |
( |
const String & | _path | ) |
|
Definition at line 40 of file _unistd.cpp.
41{
43 return chdir(path);
44}
◆ __chown()
DCLCAPI int __chown |
( |
const String & | _path, |
|
|
uid_t | _owner, |
|
|
gid_t | _group ) |
Definition at line 28 of file _unistd.cpp.
29{
31 return chown(path, _owner, _group);
32}
◆ __getcwd()
DCLCAPI int __getcwd |
( |
String & | _r | ) |
|
Definition at line 46 of file _unistd.cpp.
47{
48 char buf[PATH_MAX + 1];
49 char* s = getcwd(
buf,
sizeof(
buf));
50 if (s) {
52 return 0;
53 }
54 return -1;
55}
#define MBSTOSTR_ER(mbs, nmbs, str)
◆ __getdomainname()
DCLCAPI int __getdomainname |
( |
String | _r | ) |
|
Definition at line 122 of file _unistd.cpp.
123{
124 char buf[PATH_MAX + 1];
125 int n = getdomainname(
buf,
sizeof(
buf));
129}
void CharsetConvertException *size_t n
◆ __gethostname()
DCLCAPI int __gethostname |
( |
String & | r | ) |
|
Definition at line 113 of file _unistd.cpp.
114{
115 char buf[PATH_MAX + 1];
116 int n = gethostname(
buf,
sizeof(
buf));
120}
◆ __getlogin()
DCLCAPI int __getlogin |
( |
String & | _r | ) |
|
Definition at line 104 of file _unistd.cpp.
105{
106 char buf[PATH_MAX + 1];
107 int n = getlogin_r(
buf,
sizeof(
buf));
111}
◆ __lchown()
DCLCAPI int __lchown |
( |
const String & | _path, |
|
|
uid_t | _owner, |
|
|
gid_t | _group ) |
Definition at line 34 of file _unistd.cpp.
35{
37 return lchown(path, _owner, _group);
38}
◆ __link()
DCLCAPI int __link |
( |
const String & | _from, |
|
|
const String & | _to ) |
Definition at line 66 of file _unistd.cpp.
67{
70 return link(from, to);
71}
◆ __readlink()
DCLCAPI ssize_t __readlink |
( |
const String & | _path, |
|
|
String & | _r ) |
Definition at line 80 of file _unistd.cpp.
81{
83 char buf[PATH_MAX + 1];
84 ssize_t
n = readlink(path,
buf,
sizeof(
buf));
88 }
90}
◆ __rmdir()
DCLCAPI int __rmdir |
( |
const String & | _path | ) |
|
Definition at line 98 of file _unistd.cpp.
99{
101 return rmdir(path);
102}
◆ __symlink()
DCLCAPI int __symlink |
( |
const String & | _from, |
|
|
const String & | _to ) |
Definition at line 73 of file _unistd.cpp.
74{
77 return symlink(from, to);
78}
◆ __truncate()
DCLCAPI int __truncate |
( |
const String & | _path, |
|
|
off_t | _len ) |
Definition at line 131 of file _unistd.cpp.
132{
134 return truncate(path, _len);
135}
◆ __ttyname()
DCLCAPI int __ttyname |
( |
int | fd, |
|
|
String & | _r ) |
Definition at line 57 of file _unistd.cpp.
58{
59 char buf[PATH_MAX + 1];
60 int n = ttyname_r(fd,
buf,
sizeof(
buf));
64}
◆ __unlink()
DCLCAPI int __unlink |
( |
const String & | _path | ) |
|
Definition at line 92 of file _unistd.cpp.
93{
95 return unlink(path);
96}