in reply to Re: Re: Answer: How do I pre-extend a file to a specified size
in thread How do I pre-extend a file to a specified size

Thanks... that did the trick (kind-a): Now works fine with Win9x/2K but fails to extend the file on OpenVMS. I'll forward a bug report to the VMS porting people.
  • Comment on Re: Re: Re: Answer: How do I pre-extend a file to a specified size

Replies are listed 'Best First'.
(tye)Re: Answer: How do I pre-extend a file to a specified size
by tye (Sage) on Jan 05, 2001 at 22:42 UTC

    That snippet doesn't check any return values so it is possible that the seek() failed. But I really suspect that VMS creates a sparse file and reports the amount of space the file is using, not the maximum byte offset for the file.

    The same thing often happens under Unix -- the file isn't really preextended as far as allocating that much space on the disk. It is just that "ls" reports the maximum byte offset for the file, not how much disk space has been allocated to it.

            - tye (but my friends call me "Tye")