Skip to content

Latest commit

 

History

History
1 lines (1 loc) · 478 Bytes

File metadata and controls

1 lines (1 loc) · 478 Bytes

The DirectoryReader class, defined in grip/readers.py, is a subclass of ReadmeReader that reads README files from a directory. It locates a README file, normalizes paths, and provides methods to read file content (text or binary), determine file types, and track last modification times. It ensures safe access by preventing traversal outside the root directory. If no README is found, it either returns a default filename (if silent=True) or raises ReadmeNotFoundError.