Z
Z
Zero None2021-06-15 22:32:57
Python
Zero None, 2021-06-15 22:32:57

How does reading/writing files work?

I was wondering how reading/writing (to) files works. Usually I opened small files weighing a few KB, but then I became interested in how application logs work. They create files that report on their work. My application also needed logs, but I thought: "How does this work? Because my file can reach a size of several hundred MB, or several GB. Wouldn't this be some kind of load?". I've seen people ask what's best to use for reading multi-GB files, but I haven't seen anyone ask anything about writing. What is the difference between these modes? How do they work? Will there be additional load due to file weight?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
H
HemulGM, 2021-06-15
@HemulGM

It is possible and necessary to read the file partially. And in order to write to a file, it is not necessary to read it all or even read it.
PS This is why I insist on not getting into programming without at least basic computer knowledge

R
Ronald McDonald, 2021-06-15
@Zoominger

Add, as a rule, to the end. Logs can really grow into hundreds of GB without a drop in performance.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question