diff options
Diffstat (limited to '')
-rw-r--r-- | src/file.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/file.cpp b/src/file.cpp index 7c18a06..20ff5c9 100644 --- a/src/file.cpp +++ b/src/file.cpp | |||
@@ -110,12 +110,20 @@ bool Bu::File::isEOS() | |||
110 | 110 | ||
111 | bool Bu::File::canRead() | 111 | bool Bu::File::canRead() |
112 | { | 112 | { |
113 | #ifdef WIN32 | ||
113 | return true; | 114 | return true; |
115 | #else | ||
116 | return (fcntl( fd, F_GETFL, 0 )&O_RDONLY) == O_RDONLY; | ||
117 | #endif | ||
114 | } | 118 | } |
115 | 119 | ||
116 | bool Bu::File::canWrite() | 120 | bool Bu::File::canWrite() |
117 | { | 121 | { |
122 | #ifdef WIN32 | ||
118 | return true; | 123 | return true; |
124 | #else | ||
125 | return (fcntl( fd, F_GETFL, 0 )&O_WRONLY) == O_WRONLY; | ||
126 | #endif | ||
119 | } | 127 | } |
120 | 128 | ||
121 | bool Bu::File::isReadable() | 129 | bool Bu::File::isReadable() |