object FileUtil
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- FileUtil
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
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 val AcceptAllDirectories: FilenameFilter
- final val AcceptAllFiles: FilenameFilter
-
def
addHeader(file: File, header: String): Unit
Add header into the file
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def captureStdOutAndErr(func: ⇒ Unit): String
- def classPathLastModified(source: String, classLoader: ClassLoader = getClass.getClassLoader): Long
-
def
cleanFileName(string: String): String
Accepts an arbitrary (printable) string and returns a similar string which can be used as a file name.
Accepts an arbitrary (printable) string and returns a similar string which can be used as a file name. For convenience, replaces spaces with hyphens.
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def copy(source: File, target: File): Unit
- def copyFromClassPath(source: String, target: File, classLoader: ClassLoader = getClass.getClassLoader): Unit
-
def
copyToDir(source: File, targetDir: File): Unit
Copy file source to targetDir, keeping the original file name
- def currentWorkingDir: File
-
def
delete(fileOrDirectory: File): Unit
Like fileOrDirectory.delete() but works for non-empty directories and throws exceptions instead of returning false on failure
- def deleteIfExist(fileOrDirectory: File): Unit
- def deleteRecursive(path: Path): Unit
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def extractModuleName(path: String, sourceDir: String = "src/main/scala"): String
- def file(first: File, rest: String*): File
- def file(first: String, rest: String*): File
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def isBadFileName(string: String): Boolean
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def jarUrlToJarFile(url: URL): File
- def listDirectories(dir: File): Array[File]
-
def
listDirectoriesRecursive(dir: File): Array[File]
Starts from
dir
and builds an array of sub-directories includingdir
-
def
listFiles(dir: File, filter: FilenameFilter = AcceptAllFiles): Array[File]
Same as dir.listFiles(filter), except it returns empty array instead of null if dir doesn't exist or is not a directory
- def listFilesRecursive(dir: File): Array[File]
- def modifyName(file: File)(f: (String) ⇒ String): File
- def move(source: File, target: File): Unit
-
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 read(file: File): String
- def readAndCloseStream(stream: InputStream): String
- def replaceOrAppendExtension(fileName: String, extension: String): String
- def stripExtension(fileName: String): String
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- def urlToFile(url: URL): File
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def withFile(file: File)(f: (PrintWriter) ⇒ Unit): Unit
- def withStdOutAndErr(out: PrintStream)(func: ⇒ Unit): Unit
- def write(file: File, text: String): Unit