Posted 12 December 2015 - 02:14 PM
I've got a couple of questions regarding manipulating files using either binary or text mode:
1) Is it possible to tell when a file has been written in binary mode vs text mode?
2) If I were to copy a binary file by opening it in text mode and then writing it to the new path in text mode, would I be at risk of corrupting the data?
2)ii) Similarly, if I were to copy a text file by opening it in binary mode and then writing it to the new path in binary mode, would I be at risk of corrupting the data?
3) What are the 'end-of-line conversions' that happen when opening a file in text mode?
1) Is it possible to tell when a file has been written in binary mode vs text mode?
2) If I were to copy a binary file by opening it in text mode and then writing it to the new path in text mode, would I be at risk of corrupting the data?
2)ii) Similarly, if I were to copy a text file by opening it in binary mode and then writing it to the new path in binary mode, would I be at risk of corrupting the data?
3) What are the 'end-of-line conversions' that happen when opening a file in text mode?
Edited on 12 December 2015 - 01:15 PM