Packages

o

io.dataos.spark.utils

FileUtils

object FileUtils

Utility object for file-related operations.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FileUtils
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. 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.

  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. 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.

  12. 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.

  13. 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.

  14. 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.

  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. 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.

  18. 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.

  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. 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.

  23. 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.

  24. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  29. 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.

Inherited from AnyRef

Inherited from Any

Ungrouped