Everything is a file?

In Linux, every single entity is considered as FILE. If I do vim <cd-Name> then, vim will open the directory content into it’s editor, because, it do not differentiate between file and directories.