libfilezilla
fsresult.hpp
1 #ifndef LIBFILEZILLA_FSRESULT_HEADER
2 #define LIBFILEZILLA_FSRESULT_HEADER
3 
4 #include "private/visibility.hpp"
5 
6 #include <stdint.h>
7 
8 namespace fz {
19 class FZ_PUBLIC_SYMBOL result final
20 {
21 public:
22  enum error {
23  ok,
24 
27 
30 
33 
36 
39 
41  other
42  };
43 
44 #if FZ_WINDOWS
45  typedef uint32_t raw_t; // DWORD alternative without windows.h
46 #else
47  typedef int raw_t;
48 #endif
49 
50  explicit operator bool() const { return error_ == 0; }
51 
52  error error_{};
53 
54  raw_t raw_{};
55 };
56 
57 }
58 
59 #endif
error
Definition: fsresult.hpp:22
Small class to return filesystem errors.
Definition: fsresult.hpp:19
The namespace used by libfilezilla.
Definition: apply.hpp:17
Requested file does not exist or is not a file.
Definition: fsresult.hpp:32
Requested dir does not exist or is not a dir.
Definition: fsresult.hpp:35
Invalid arguments, syntax error.
Definition: fsresult.hpp:26
Out of disk space.
Definition: fsresult.hpp:38
Permission denied.
Definition: fsresult.hpp:29