MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / fixFileName

Method fixFileName

CodenameOne/src/com/codename1/io/Storage.java:171–182  ·  view source on GitHub ↗
(String name)

Source from the content-addressed store, hash-verified

169 ///
170 /// the fixed filename
171 private String fixFileName(String name) {
172 if (normalizeNames) {
173 name = StringUtil.replaceAll(name, "/", "_");
174 name = StringUtil.replaceAll(name, "\\", "_");
175 name = StringUtil.replaceAll(name, "%", "_");
176 name = StringUtil.replaceAll(name, "?", "_");
177 name = StringUtil.replaceAll(name, "*", "_");
178 name = StringUtil.replaceAll(name, ":", "_");
179 name = StringUtil.replaceAll(name, "=", "_");
180 }
181 return name;
182 }
183
184 /// Storage is cached for faster access, however this might cause a problem with refreshing
185 /// objects since they are not cloned. Clearing the cache allows to actually reload from the

Callers 7

deleteStorageFileMethod · 0.95
createOutputStreamMethod · 0.95
createInputStreamMethod · 0.95
existsMethod · 0.95
entrySizeMethod · 0.95
writeObjectMethod · 0.95
readObjectMethod · 0.95

Calls 1

replaceAllMethod · 0.95

Tested by

no test coverage detected