Comment

Comment by throwaway98434

The unix filesystem api doesn't provide a way to interact with sectors. The primitives are files and the methods available are writing more data, or truncating.

There is no function provided for shifting the byte offset of data in a file.

You can write an entirely new file, of course, but the question has an implicit goal of doing this efficiently.

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton