equal
deleted
inserted
replaced
125 ''' |
125 ''' |
126 Encodes filenames containing names reserved by Windows or which end in |
126 Encodes filenames containing names reserved by Windows or which end in |
127 period or space. Does not touch other single reserved characters c. |
127 period or space. Does not touch other single reserved characters c. |
128 Specifically, c in '\\:*?"<>|' or ord(c) <= 31 are *not* encoded here. |
128 Specifically, c in '\\:*?"<>|' or ord(c) <= 31 are *not* encoded here. |
129 Additionally encodes space or period at the beginning, if dotencode is |
129 Additionally encodes space or period at the beginning, if dotencode is |
130 True. |
130 True. Parameter path is assumed to be all lowercase. |
131 path is assumed to be all lowercase. |
131 A segment only needs encoding if a reserved name appears as a |
|
132 basename (e.g. "aux", "aux.foo"). A directory or file named "foo.aux" |
|
133 doesn't need encoding. |
132 |
134 |
133 >>> _auxencode('.foo/aux.txt/txt.aux/con/prn/nul/foo.', True) |
135 >>> _auxencode('.foo/aux.txt/txt.aux/con/prn/nul/foo.', True) |
134 '~2efoo/au~78.txt/txt.aux/co~6e/pr~6e/nu~6c/foo~2e' |
136 '~2efoo/au~78.txt/txt.aux/co~6e/pr~6e/nu~6c/foo~2e' |
135 >>> _auxencode('.com1com2/lpt9.lpt4.lpt1/conprn/com0/lpt0/foo.', False) |
137 >>> _auxencode('.com1com2/lpt9.lpt4.lpt1/conprn/com0/lpt0/foo.', False) |
136 '.com1com2/lp~749.lpt4.lpt1/conprn/com0/lpt0/foo~2e' |
138 '.com1com2/lp~749.lpt4.lpt1/conprn/com0/lpt0/foo~2e' |