file - Difference between os.path.exists and os.path.isfile in python -


i'm curious when these 2 functions return different values. if clarify difference between path/directory/file appreciated.

as have found out, difference between exists , isfile fact former returns true in case given path directory or file, while latter returns true if path points file.

directories , files quite similar technical point of view. file can contain kind of data. directory special entry in file system (at least on unix operating systems special file) represents fact may contain files , other directories. helpful means building data structure. using directories, can organize data in hierarchical structure.

especially in windows world, directories called "folders". sure using "folders" organizing files.

a path unambiguous pointer resource in file system. can either point file or directory.


Comments