Returns filepath in (ASCII) format acceptable for OS handling (e.g. reading) >>> 'sqlmap' in safeFilepathEncode(paths.SQLMAP_HOME_PATH) True
(filepath)
| 2126 | return retVal |
| 2127 | |
| 2128 | def safeFilepathEncode(filepath): |
| 2129 | """ |
| 2130 | Returns filepath in (ASCII) format acceptable for OS handling (e.g. reading) |
| 2131 | |
| 2132 | >>> 'sqlmap' in safeFilepathEncode(paths.SQLMAP_HOME_PATH) |
| 2133 | True |
| 2134 | """ |
| 2135 | |
| 2136 | retVal = filepath |
| 2137 | |
| 2138 | if filepath and six.PY2 and isinstance(filepath, six.text_type): |
| 2139 | retVal = getBytes(filepath, sys.getfilesystemencoding() or UNICODE_ENCODING) |
| 2140 | |
| 2141 | return retVal |
| 2142 | |
| 2143 | |
| 2144 | def safeExpandUser(filepath): |
no test coverage detected
searching dependent graphs…