summaryrefslogtreecommitdiff
path: root/src/file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/file.cpp')
-rw-r--r--src/file.cpp8
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
111bool Bu::File::canRead() 111bool 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
116bool Bu::File::canWrite() 120bool 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
121bool Bu::File::isReadable() 129bool Bu::File::isReadable()