Inner function for statSync. Returns: Union[Dict[str, int], False]: The mode of the file or False if the file doesn't exist.
(filename: str)
| 223 | |
| 224 | |
| 225 | def statSync_inner(filename: str) -> Union[Dict[str, int], bool]: |
| 226 | """ |
| 227 | Inner function for statSync. |
| 228 | |
| 229 | Returns: |
| 230 | Union[Dict[str, int], False]: The mode of the file or False if the file doesn't exist. |
| 231 | """ |
| 232 | from os import stat |
| 233 | filename = os.path.normpath(filename) |
| 234 | if (os.path.exists(filename)): |
| 235 | sb = stat(filename) |
| 236 | return {'mode': sb.st_mode} |
| 237 | else: |
| 238 | return False |
| 239 | |
| 240 | |
| 241 | def readFileSync(filename, charset) -> str: |
nothing calls this directly
no outgoing calls
no test coverage detected