public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cygwin api to punch a hole into a file?
@ 2023-11-23 22:36 Cedric Blancher
  2023-11-24 11:01 ` Corinna Vinschen
  0 siblings, 1 reply; 12+ messages in thread
From: Cedric Blancher @ 2023-11-23 22:36 UTC (permalink / raw)
  To: cygwin

Linux has fallocate(fd, FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE, ...)
to punch a hole into a file, i.e. deallocate the blocks given and make
the file a "sparse file".

But how can I do that with the Cygwin API? Does anyone have an example
for Cygwin, which is the Win equivalent to Linux fallocate(fd,
FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE, 1048576, 2097152);?

I tried with Cygwin 3.5, but the file was not sparse after that.

Ced
-- 
Cedric Blancher <cedric.blancher@gmail.com>
[https://plus.google.com/u/0/+CedricBlancher/]
Institute Pasteur

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-12-05 15:15 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-23 22:36 Cygwin api to punch a hole into a file? Cedric Blancher
2023-11-24 11:01 ` Corinna Vinschen
2023-11-28 10:29   ` Corinna Vinschen
2023-12-01 10:22     ` Cedric Blancher
2023-12-01 11:02       ` Corinna Vinschen
2023-12-04 16:07         ` Andrey Repin
2023-12-05  6:36         ` Thomas Wolff
2023-12-05 13:53           ` Corinna Vinschen
2023-12-05 14:40             ` Thomas Wolff
2023-12-05 14:47               ` Thomas Wolff
2023-12-05 15:15                 ` Corinna Vinschen
2023-12-01 10:44     ` _PC_MIN_HOLE_SIZE pathconf() " Cedric Blancher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).