IO
A module with input/output operations from/to the underlying file system.
Attributes
Members list
Value members
Concrete methods
Appends lines
to the text file fileName
using encoding enc
.
Appends lines
to the text file fileName
using encoding enc
.
Value parameters
- enc
-
the encoding of the file.
- fileName
-
the path of the file.
- lines
-
the lines to append to the file.
Attributes
- Source
- IO.scala
Appends string
to the text file fileName
using encoding enc
.
Appends string
to the text file fileName
using encoding enc
.
Value parameters
- enc
-
the encoding of the file.
- fileName
-
the path of the file.
- text
-
the text to be appended to the file.
Attributes
- Source
- IO.scala
Create a directory with name dir
if it does not exist.
Create a directory with name dir
if it does not exist.
Value parameters
- dir
-
the path of the directory to be created.
Attributes
- Returns
-
true if and only if the directory was created, along with all necessary parent directories otherwise false.
- Source
- IO.scala
Gets the path of the current working directory.
Gets the path of the current working directory.
Attributes
- Returns
-
the path of the current working directory.
- Source
- IO.scala
Deletes fileName
.
Deletes fileName
.
Value parameters
- fileName
-
the path the file that will be deleted.
Attributes
- Source
- IO.scala
Test if a file with name fileName
exists.
Test if a file with name fileName
exists.
Value parameters
- fileName
-
the path of the file.
Attributes
- Returns
-
true if the file exists else false.
- Source
- IO.scala
Gets a sequence of file names in the directory dir
.
Gets a sequence of file names in the directory dir
.
Value parameters
- dir
-
the path of the directory to be listed.
Attributes
- Returns
-
a sequence of file names in the directory `dir
- Source
- IO.scala
Load image from file.
Load image from file.
Value parameters
- fileName
-
the path to the image that will be loaded.
Attributes
- Source
- IO.scala
Load image from file.
Load image from file.
Value parameters
- file
-
the file that will be loaded.
Attributes
- Source
- IO.scala
Load string lines from a text file called fileName
using encoding enc
.
Load string lines from a text file called fileName
using encoding enc
.
Value parameters
- enc
-
the encoding of the file.
- fileName
-
the path of the file.
Attributes
- Source
- IO.scala
Load a serialized object from a binary file called fileName
.
Load a serialized object from a binary file called fileName
.
Value parameters
- fileName
-
the path of the file.
Attributes
- Returns
-
the serialized object.
- Source
- IO.scala
Load a string from a text file called fileName
using encoding enc
.
Load a string from a text file called fileName
using encoding enc
.
Value parameters
- enc
-
the encoding of the file.
- fileName
-
the path of the file.
Attributes
- Returns
-
the content loaded from the file.
- Source
- IO.scala
Change name of file from
, DANGER: silently replaces existing to
.
Change name of file from
, DANGER: silently replaces existing to
.
Value parameters
- from
-
the path of the file to be moved.
- to
-
the path the file will be moved to.
Attributes
- Source
- IO.scala
Save img
to file as JPEG
. Does not restore color of transparent pixels.
Save img
to file as JPEG
. Does not restore color of transparent pixels.
Value parameters
- compression
-
the compression factor to use
(0.0-1.0)
. - fileName
-
the path to save the image to,
path/file.jpg
or justpath/file
- image
-
the image to save.
Attributes
- Source
- IO.scala
Save img
to file as JPEG
with a compression ratio of 0.75. Restore color of transparent pixels.
Save img
to file as JPEG
with a compression ratio of 0.75. Restore color of transparent pixels.
Value parameters
- fileName
-
the path to save the image to,
path/file.jpg
or justpath/file
. - img
-
the image to save.
Attributes
- Source
- IO.scala
Save lines
to a text file called fileName
using encoding enc
.
Save lines
to a text file called fileName
using encoding enc
.
Value parameters
- enc
-
the encoding of the file.
- fileName
-
the path of the file.
- lines
-
the lines to written to the file.
Attributes
- Source
- IO.scala
Serialize obj
to a binary file called fileName
.
Serialize obj
to a binary file called fileName
.
Value parameters
- fileName
-
the path of the file.
- obj
-
the object to be serialized.
Attributes
- Source
- IO.scala
Save img
to file as PNG
.
Save img
to file as PNG
.
Value parameters
- fileName
-
the path to save the image to,
path/file.png
or justpath/file
. - img
-
the image to save.
Attributes
- Source
- IO.scala
Save text
to a text file called fileName
using encoding enc
.
Save text
to a text file called fileName
using encoding enc
.
Value parameters
- enc
-
the encoding of the file.
- fileName
-
the path of the file.
- text
-
the text to be written to the file.
Attributes
- Source
- IO.scala