trait FilenameSanitization extends AnyRef
Utility mixin that includes methods for sanitizing filenames and paths for use in an actual filesystem.
- Alphabetic
- By Inheritance
- FilenameSanitization
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- implicit class StringFilenameSanitization extends AnyRef
Convenience implicit that lets you call
myPath.toSanitizedPath
ormyFilename.toSanitizedFilename
.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- lazy val illegalFilenameChars: Set[Char]
A set of Chars that may not be present in a file name.
A set of Chars that may not be present in a file name. (Forward and backward slashes are allowed in paths as separators, so they should not be included in a filename. Therefore they are included in this set.)
- lazy val illegalPathChars: Set[Char]
A set of Chars that may not be present in a file path.
A set of Chars that may not be present in a file path. (Forward and backward slashes are allowed in paths as separators, so they will not be present in this set.)
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def sanitize(s: String, illegalChars: Set[Char]): String
- def sanitizeFilename(name: String): String
Creates a copy of the given
name
where any illegal filename character in the originalname
is replaced with an underscore.Creates a copy of the given
name
where any illegal filename character in the originalname
is replaced with an underscore. Forward and backward slashes are also removed; to keep them, usesanitizePath
instead. - def sanitizePath(path: String): String
Creates a copy of the given
path
where any illegal path character in the originalpath
is replaced with an underscore.Creates a copy of the given
path
where any illegal path character in the originalpath
is replaced with an underscore. Forward and backward slashes are left as-is. - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()