Loads config file into a raw modifiable AST. Args: filepath (Text): path of config file to load. Expects UTF-8 encoding. Returns: :class:`apacheconfig.ListNode` AST containing parsed config file. Raises: IOError: If there
(self, filepath)
| 33 | self._reader = LocalHostReader() |
| 34 | |
| 35 | def load(self, filepath): |
| 36 | """Loads config file into a raw modifiable AST. |
| 37 | |
| 38 | Args: |
| 39 | filepath (Text): path of config file to load. Expects UTF-8 |
| 40 | encoding. |
| 41 | |
| 42 | Returns: |
| 43 | :class:`apacheconfig.ListNode` AST containing parsed config file. |
| 44 | |
| 45 | Raises: |
| 46 | IOError: If there is a problem opening the file specified. |
| 47 | """ |
| 48 | with self._reader.open(filepath) as f: |
| 49 | return self.loads(f.read()) |
| 50 | |
| 51 | def loads(self, text): |
| 52 | """Loads config text into a raw modifiable AST. |