Files can store all sorts of information. However, most file formats (e.g., picture formats such as PNG and JPEG) are binary, and very difficult and/or impossible to write using normal text techniquesin these situations, you should use the library designed to cope with each format. One reminder: if you are using an operating system that uses backslash (\) as the path separator (e.g., Windows), you need to escape the backslash with another backslash, making (\\). Owing to this, handling files can be quite different for Windows and Unix users. Both operating systems are covered here. |