when a file a read, its taken to memory(RAM i suppose).If this is the case than how would i make a program that can copy a file from one location to another assuming that the size of file is greater than my RAM memory size? Is there a way to take only half or 1/4 th file in memory at once?
Thanks for your links Daleth .But I still have a doubt.The last link says that only 512 bytes or 4 KB of file is read into memory.And that too depends on your hard drive.Is there a way I can control this size.I mean if I want to load 20KB in memory at once, as against the defaults of my HDD.
Why do you care what buffer size is used? It's all taken care of behind the scene so normally you don't notice. It could have an impact on performance but you should probably do some tests to see that it really helps, and that it doesn't make it worse.