diff options
Diffstat (limited to 'src/file.cpp')
| -rw-r--r-- | src/file.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/file.cpp b/src/file.cpp index f1f63e4..a0c3fd8 100644 --- a/src/file.cpp +++ b/src/file.cpp | |||
| @@ -187,19 +187,27 @@ void Bu::File::setBlocking( bool bBlocking ) | |||
| 187 | #endif | 187 | #endif |
| 188 | } | 188 | } |
| 189 | 189 | ||
| 190 | #ifndef WIN32 | ||
| 191 | Bu::File Bu::File::tempFile( Bu::FString &sName ) | 190 | Bu::File Bu::File::tempFile( Bu::FString &sName ) |
| 192 | { | 191 | { |
| 192 | #ifndef WIN32 | ||
| 193 | int afh_d = mkstemp( sName.getStr() ); | 193 | int afh_d = mkstemp( sName.getStr() ); |
| 194 | 194 | ||
| 195 | return Bu::File( afh_d ); | 195 | return Bu::File( afh_d ); |
| 196 | #else | ||
| 197 | return Bu::File( sName, Bu::File::Write|Bu::File::Create ); | ||
| 198 | #endif | ||
| 196 | } | 199 | } |
| 197 | 200 | ||
| 198 | void Bu::File::truncate( long nSize ) | 201 | void Bu::File::setSize( long iSize ) |
| 199 | { | 202 | { |
| 200 | ftruncate( fd, nSize ); | 203 | #ifndef WIN32 |
| 204 | ftruncate( fd, iSize ); | ||
| 205 | #else | ||
| 206 | #warning Bu::File::setSize not implemented on this platform | ||
| 207 | #endif | ||
| 201 | } | 208 | } |
| 202 | 209 | ||
| 210 | #ifndef WIN32 | ||
| 203 | void Bu::File::chmod( mode_t t ) | 211 | void Bu::File::chmod( mode_t t ) |
| 204 | { | 212 | { |
| 205 | fchmod( fd, t ); | 213 | fchmod( fd, t ); |
