what is a file ?

view story

http://www.unix.com – I have few basic doubts about files 1) Windows recognizes file by its extension like (.txt , .csv). How does unix/linux do it ? 2) How does file editor capable of editing various file formats ? Whats the logic behind it ? 3) Does all files have metadata ? 4) If they contain a meta data how to read it (tel me some simple python script)? 5) Are the properties like timestamp, permission, size are stored in the file itself? 6) Is it possible to create my own file and a file editor, such that no other file editor (e.g vi) could read it ? If yes pls let me know the tutorial (HowTos)