Host/Util.h
Go to the documentation of this file.
1 
23 #pragma once
24 
25 #include "../Error.h"
26 #include "../OpenFlags.h"
27 #include <errno.h>
28 #include <WString.h>
29 
30 struct stat;
31 
32 namespace IFS
33 {
34 namespace Host
35 {
39 inline int syserr()
40 {
41  return Error::fromSystem(-errno);
42 }
43 
47 int mapFlags(OpenFlags flags);
48 
49 String getErrorString(int err);
50 
51 } // namespace Host
52 } // namespace IFS
The String class.
Definition: WString.h:136
int syserr()
Get IFS error code for the current system errno.
Definition: Host/Util.h:39
Definition: DirectoryTemplate.h:36
Manage a set of bit values using enumeration.
Definition: BitSet.h:43
int fromSystem(int syscode)
Translate system error code into IFS error code.
Definition: Error.h:113
String getErrorString(int err)
int mapFlags(OpenFlags flags)
Get corresponding host flags for given IFS flags.