{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
class FileTestStorage : PlatformTestStorage
A class that reads/writes the runner data using the raw file system.
This API is experimental and is subject to change or removal in future releases.
Public constructors |
|
|---|---|
Public functions |
|
|---|---|
Unit |
addOutputProperties(properties: (Mutable)Map<String!, Serializable!>!)Test output properties is not supported when raw file I/O is used. |
String! |
getInputArg(argName: String!)Test input arguments is not supported when raw file I/O is used. |
(Mutable)Map<String!, String!>! |
Test input arguments is not supported when raw file I/O is used. |
(Mutable)Map<String!, Serializable!>! |
Test output properties is not supported when raw file I/O is used. |
InputStream! |
openInputFile(pathname: String!)Provides an InputStream to a test file dependency. |
InputStream! |
openInternalInputFile(pathname: String!)Provides an InputStream to an internal file used by the testing infrastructure. |
OutputStream! |
openInternalOutputFile(pathname: String!)Provides an OutputStream to an internal file used by the testing infrastructure. |
OutputStream! |
openOutputFile(pathname: String!)Provides an OutputStream to a test output file. |
OutputStream! |
openOutputFile(pathname: String!, append: Boolean)Provides an OutputStream to a test output file. |
fun addOutputProperties(properties: (Mutable)Map<String!, Serializable!>!): Unit
Test output properties is not supported when raw file I/O is used.
fun getInputArg(argName: String!): String!
Test input arguments is not supported when raw file I/O is used.
null is always returned.
fun getInputArgs(): (Mutable)Map<String!, String!>!
Test input arguments is not supported when raw file I/O is used.
An empty map is always returned.
fun getOutputProperties(): (Mutable)Map<String!, Serializable!>!
Test output properties is not supported when raw file I/O is used.
An empty map is always returned.
fun openInputFile(pathname: String!): InputStream!
Provides an InputStream to a test file dependency.
| Parameters | |
|---|---|
pathname: String! |
path to the test file dependency. Should not be null. This is an absolute file path on the device, and it's the infrastructure/client's responsibility to make sure the file path is readable. |
| Throws | |
|---|---|
java.io.IOException: java.io.IOException |
|
fun openInternalInputFile(pathname: String!): InputStream!
Provides an InputStream to an internal file used by the testing infrastructure.
| Parameters | |
|---|---|
pathname: String! |
path to the internal input file. Should not be null. This is an absolute file path on the device, and it's the infrastructure/client's responsibility to make sure the file path is readable. |
| Throws | |
|---|---|
java.io.IOException: java.io.IOException |
|
fun openInternalOutputFile(pathname: String!): OutputStream!
Provides an OutputStream to an internal file used by the testing infrastructure.
| Parameters | |
|---|---|
pathname: String! |
path to the internal output file. Should not be null. This is an absolute file path on the device, and it's the infrastructure/client's responsibility to make sure the file path is writable. |
| Throws | |
|---|---|
java.io.IOException: java.io.IOException |
|
fun openOutputFile(pathname: String!): OutputStream!
Provides an OutputStream to a test output file.
| Parameters | |
|---|---|
pathname: String! |
path to the test file dependency. Should not be null. This is an absolute file path on the device, and it's the infrastructure/client's responsibility to make sure the file path is writable. |
| Throws | |
|---|---|
java.io.IOException: java.io.IOException |
|
fun openOutputFile(pathname: String!, append: Boolean): OutputStream!
Provides an OutputStream to a test output file.
| Parameters | |
|---|---|
pathname: String! |
path to the test output file. Should not be null. |
append: Boolean |
if true, then the lines will be added to the end of the file rather than overwriting. |
| Returns | |
|---|---|
OutputStream! |
an OutputStream to the given output file. |
| Throws | |
|---|---|
java.io.IOException: java.io.IOException |
|