Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Basic4ppc Wishlist
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Basic4ppc Wishlist Missing any feature?

Flush file write buffer?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-09-2009, 04:21 PM
Basic4ppc Expert
 
Join Date: May 2008
Location: Berkshire, UK
Posts: 762
Awards Showcase
Beta Tester 
Total Awards: 1
Default Flush file write buffer?

I wanted to include the ability to make a copy of a file that the program had just been writing (so that one file could be terminated immediately while the other was retained for completion later).

I wasn't sure whether the CopyFile() would work while the source file is still open for writing but it does. However the file is not complete; I suspect that some of the last few file writes have been buffered and not written to the file and thus do not get copied.

If I close the file and re-open it (for appending this time) then the copy works fine.

Could there be a flush function, say FileFlush(), to ensure the final buffer-full is written?

BTW the help for FileOpen() should not describe the cWrite option as meaning "write-only" when it goes on to say that it permits read functions.

Mike.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Serial Buffer ceaser Questions (Windows Mobile) 2 01-09-2009 02:45 PM
TX buffer micro Questions (Windows Mobile) 4 09-15-2008 05:44 PM
How to delete and overwrite a write-protected file? Hertz Questions (Windows Mobile) 4 07-25-2008 06:59 PM
Need a format to write large .dat file with numbers Stellaferox Questions (Windows Mobile) 4 02-04-2008 02:16 AM
Unbuffered Write / Buffer Flush davidmw Basic4ppc Wishlist 5 07-07-2007 11:26 PM


All times are GMT. The time now is 02:17 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0