RAGS - v1.10.0
    Preparing search index...

    Variable readFile

    readFile: (file: string | File) => string

    Type Declaration

      • (file: string | File): string
      • Reads a file synchronously and returns its contents as a string.

        Returns an empty string if the file cannot be read.

        Parameters

        • file: string | File

          File path string or Gio.File object

        Returns string

        The file contents, or '' on error

        const content = readFile('/etc/hostname');