[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to truncate a file after partly overwriting it
From: |
Mike Miller |
Subject: |
Re: How to truncate a file after partly overwriting it |
Date: |
Sat, 8 Feb 2014 17:53:13 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sat, Feb 08, 2014 at 13:32:15 -0800, Philip Nienhuis wrote:
> Thanks, I found similar solutions with google.
> Some mor goolging shows that my request perhaps looks obvious but isn't so
> easy. Matlab has the same limitations it seems.
> On *nix systems (incl. Mac OSX) there seems to be a "truncate"/"ftruncate"
> command, but I need it for Windows as well. AFAICS for MinGW these commands
> either don't work, or are buggy, or are still in development.
>
> My point is that I want to replace part(s) of potentially very large XML
> files. These can get really big, so it is handy to keep as much file
> contents as possible on disk and not in memory.
I think this would be useful as well, so I went ahead and submitted a
wish list bug to implement the ftruncate function. Portability should
not be a problem since gnulib provides a (presumably working) ftruncate
function for Windows systems.
https://savannah.gnu.org/bugs/?41517
--
mike