Get path to directory in which to store info files. The directory returned by this function is "owned" by this module. If the contents of the directory are modified other than via the public functions of this module, subsequent behavior is undefined. The directory will be created i
()
| 218 | |
| 219 | |
| 220 | def _get_info_dir(): |
| 221 | """Get path to directory in which to store info files. |
| 222 | |
| 223 | The directory returned by this function is "owned" by this module. If |
| 224 | the contents of the directory are modified other than via the public |
| 225 | functions of this module, subsequent behavior is undefined. |
| 226 | |
| 227 | The directory will be created if it does not exist. |
| 228 | """ |
| 229 | path = os.path.join(tempfile.gettempdir(), ".tensorboard-info") |
| 230 | try: |
| 231 | os.makedirs(path) |
| 232 | except OSError as e: |
| 233 | if e.errno == errno.EEXIST and os.path.isdir(path): |
| 234 | pass |
| 235 | else: |
| 236 | raise |
| 237 | else: |
| 238 | os.chmod(path, 0o777) |
| 239 | return path |
| 240 | |
| 241 | |
| 242 | def _get_info_file_path(): |
no test coverage detected
searching dependent graphs…