Class: Daytona::FileUpload
- Inherits:
-
Object
- Object
- Daytona::FileUpload
- Defined in:
- lib/daytona/common/file_system.rb
Instance Attribute Summary collapse
-
#destination ⇒ String
readonly
Absolute destination path in the Sandbox.
-
#source ⇒ String, IO
readonly
File contents as a string/bytes object or a local file path or IO object.
Instance Method Summary collapse
-
#initialize(source, destination) ⇒ FileUpload
constructor
Initializes a new FileUpload instance.
Constructor Details
#initialize(source, destination) ⇒ FileUpload
Initializes a new FileUpload instance.
18 19 20 21 |
# File 'lib/daytona/common/file_system.rb', line 18 def initialize(source, destination) @source = source @destination = destination end |
Instance Attribute Details
#destination ⇒ String (readonly)
Returns Absolute destination path in the Sandbox. Relative paths are resolved based on the sandbox working directory.
12 13 14 |
# File 'lib/daytona/common/file_system.rb', line 12 def destination @destination end |
#source ⇒ String, IO (readonly)
Returns File contents as a string/bytes object or a local file path or IO object. If a string path is provided, the file content will be read from disk. If a string content is provided, make sure it fits into memory.
8 9 10 |
# File 'lib/daytona/common/file_system.rb', line 8 def source @source end |