All tests pass!

This commit is contained in:
2024-08-14 23:48:30 -04:00
parent 52b44367c0
commit b36c849790
5 changed files with 95 additions and 67 deletions

View File

@@ -1,6 +1,8 @@
# file_type.py
# Identify type of file: file, directory, link, broken link
import errno
import os
from pathlib import Path
class FileType():
@@ -13,7 +15,7 @@ class FileType():
if p.is_symlink():
return "broken-link"
else:
raise FileNotFound(errno.ENOENT, os.strerror(errno.ENOENT), filename)
raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), filename)
if p.is_symlink():
return "symlink"
if p.is_dir():