[futurebasic] Re: [FB] Files larger than 2^31 bytes

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 2009 : Group Archive : Group : All Groups

From: Brian Stevens <bstevens33@...>
Date: Tue, 13 Oct 2009 14:28:40 -0700
On Oct 13, 2009, at 1:56 PM, Robert Purves wrote:

>
> Brian Stevens wrote:
>
>> local fn OpenFileGetSize
>> '~'1
>> dim as SInt64     size
>> dim as FSRef      fileRef
>>
>> fileRef = fn GetFSRefForDataFile
>> open "I", _theFileID, @fileRef   // open file based on FSRef,  
>> CFURLRef etc...
>> size = lof( _theFileID, 1 ) // get size of file in bytes and make  
>> calcs based on that.
>>
>> end fn = size
>
> In view of the thread subject, and looking ahead to the forthcoming  
> terabyte-file-capable FB 5.4.1, this should be:
>
> local fn OpenFileGetSize as SInt64
> ...
> end fn = size

Agreed. There are other items in that code to clean up.


Brian S.