For example I have a path named ’logs/results.log’. the 'results.log' is a file. I want to know whether the directory in the file path exist. Note that the file path is a string.
Note: I want to check whether the directory contained in the given path is existed. For my example I want to check whether the 'logs/' is a directory but not whether the 'logs/results.log' is a directory. One of my confusion is about whether the directory is 'logs' or 'logs/'.