Lines Matching full:username
33 def userNameToFileName(userName, existing=[], prefix="", suffix=""): argument
40 userName (str): The input file name.
99 if not isinstance(userName, str):
100 raise ValueError("The value for userName must be a string.")
106 if not prefix and userName[0] == ".":
107 userName = "_" + userName[1:]
110 for character in userName:
118 userName = "".join(filteredUserName)
121 userName = userName[:sliceLength]
124 for part in userName.split("."):
128 userName = ".".join(parts)
130 fullName = prefix + userName + suffix
132 fullName = handleClash1(userName, existing, prefix, suffix)
136 def handleClash1(userName, existing=[], prefix="", suffix=""): argument
146 >>> handleClash1(userName="A" * 5, existing=e,
153 >>> handleClash1(userName="A" * 5, existing=e,
160 >>> handleClash1(userName="A" * 5, existing=e,
169 if prefixLength + len(userName) + suffixLength + 15 > maxFileNameLength:
170 l = (prefixLength + len(userName) + suffixLength + 15)
172 userName = userName[:sliceLength]
177 name = userName + str(counter).zfill(15)