Is there an existing function to add bytes in a file at the current position (not at the end of the file)? Because it's very slow to cut the file on parts and then concrete them (for example if the file is 1GB).

By "add bytes" I assume you mean insert rather than overwrite, and the answer is no. For very large files you'd probably be better off working out a multi-file scheme where the point of insertion contains a reference to another file with the inserted data rather than the data itself.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.