Class: Google::Apis::TestingV1::RegularFile

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/testing_v1/classes.rb,
generated/google/apis/testing_v1/representations.rb,
generated/google/apis/testing_v1/representations.rb

Overview

A file or directory to install on the device before the test starts

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ RegularFile

Returns a new instance of RegularFile



1268
1269
1270
# File 'generated/google/apis/testing_v1/classes.rb', line 1268

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#contentGoogle::Apis::TestingV1::FileReference

A reference to a file, used for user inputs. Corresponds to the JSON property content



1246
1247
1248
# File 'generated/google/apis/testing_v1/classes.rb', line 1246

def content
  @content
end

#device_pathString

Where to put the content on the device. Must be an absolute, whitelisted path. If the file exists, it will be replaced. The following device-side directories and any of their subdirectories are whitelisted:

$`EXTERNAL_STORAGE`, or /sdcard

$`ANDROID_DATA`/local/tmp, or /data/local/tmp

Specifying a path outside of these directory trees is invalid.

The paths /sdcard and /data will be made available and treated as implicit path substitutions. E.g. if /sdcard on a particular device does not map to external storage, the system will replace it with the external storage path prefix for that device and copy the file there.

It is strongly advised to use the Environment API in app and test code to access files on the device in a portable way. Required Corresponds to the JSON property devicePath

Returns:

  • (String)


1266
1267
1268
# File 'generated/google/apis/testing_v1/classes.rb', line 1266

def device_path
  @device_path
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1273
1274
1275
1276
# File 'generated/google/apis/testing_v1/classes.rb', line 1273

def update!(**args)
  @content = args[:content] if args.key?(:content)
  @device_path = args[:device_path] if args.key?(:device_path)
end