object FileUtils
Utility object for file-related operations.
- Alphabetic
- By Inheritance
- FileUtils
- AnyRef
- Any
- Hide All
- Show All
- 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
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
deleteDir(file: File): Boolean
Deletes a directory and its contents recursively.
Deletes a directory and its contents recursively.
- file
The directory to be deleted.
- returns
True if the directory was successfully deleted, false otherwise.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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
getContentFromFileAsString(file: File): String
Reads the content of a file as a string.
Reads the content of a file as a string.
- file
The file.
- returns
The content of the file as a string.
-
def
getListOfFiles(dir: String): List[File]
Retrieves the list of files in a directory.
Retrieves the list of files in a directory.
- dir
The directory path.
- returns
A list of files in the directory.
- Exceptions thrown
java.io.FileNotFoundException
if the directory does not exist.
-
def
getObjectMapperByExtension(extension: String): ObjectMapper
Retrieves the ObjectMapper instance based on the given file extension.
Retrieves the ObjectMapper instance based on the given file extension.
- extension
The file extension.
- returns
The ObjectMapper instance.
-
def
getObjectMapperByFileName(fileName: String): ObjectMapper
Retrieves the ObjectMapper instance based on the given file name.
Retrieves the ObjectMapper instance based on the given file name.
- fileName
The file name.
- returns
The ObjectMapper instance.
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
joinPaths(filePath: String, path: String): String
Joins two paths into a single path string.
Joins two paths into a single path string.
- filePath
The base path.
- path
The path to be appended.
- returns
The joined path.
-
def
jsonFileToObject[T](file: File)(implicit arg0: Manifest[T]): T
Reads a JSON file and deserializes it to an object of the specified type.
Reads a JSON file and deserializes it to an object of the specified type.
- T
The type of the object.
- file
The JSON file.
- returns
The deserialized object.
- Exceptions thrown
io.dataos.spark.exceptions.FlareException
if there is an error in reading or deserializing the JSON file.
-
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
readConfigurationFile(path: String): String
Reads a configuration file and performs variable substitution using system properties and environment variables.
Reads a configuration file and performs variable substitution using system properties and environment variables.
- path
The path to the configuration file.
- returns
The content of the file with variable substitution.
-
def
readFileWithHadoop(path: String, sparkSession: SparkSession): String
Reads a file using Hadoop FileSystem APIs.
Reads a file using Hadoop FileSystem APIs.
- path
The path of the file.
- sparkSession
The SparkSession instance.
- returns
The content of the file as a string.
-
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( ... )
-
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
writeYamlFile(filePath: String, configuration: Map[String, Any]): Unit
Writes a Map as YAML content to a file.
Writes a Map as YAML content to a file.
- filePath
The path of the file to be written.
- configuration
The Map representing the YAML content.