See some documents have their own extension, I was very confused, how these extensions are real.
For example: . Txt document
How these extensions are to be identified?
Can not do their own extension that?
If you do, please tell me the principle.
Thank you
File extensions have little meaning. They're more of a hint about what is in the file. There is nothing preventing me from taking a file.bmp and renaming it to file.txt . I think paint would still recognize that this is a bitmap (Though that is not necessarily true for all files and all programs) . You are free to make up your own extenions or not use them at all. The contents of the file is what really matters.
As hamsterman says, the extension is just used by the OS to figure out what program to open the file with. You can still open the file with whatever you like, and as long as the program doesn't specifically check (I'm sure some do), the content is the only thing it cares about.