I'm trying to find out if its a path or a file.
I tried it with the os lib from python.
path = '/home/User/Desktop/file.txt'
isFile = os.path.isfile(path)
print(isFile) -> False
Why do I get false and not true?
os.path.isfile will return False if the file doesn't exist. You might want to check os.path.exists(path)
as well.