Class: DaytonaToolboxApiClient::FileSystemApi
- Inherits:
-
Object
- Object
- DaytonaToolboxApiClient::FileSystemApi
- Defined in:
- lib/daytona_toolbox_api_client/api/file_system_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_folder(path, mode, opts = {}) ⇒ nil
Create a folder Create a folder with the specified path and optional permissions.
-
#create_folder_with_http_info(path, mode, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Create a folder Create a folder with the specified path and optional permissions.
-
#delete_file(path, opts = {}) ⇒ nil
Delete a file or directory Delete a file or directory at the specified path.
-
#delete_file_with_http_info(path, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a file or directory Delete a file or directory at the specified path.
-
#download_file(path, opts = {}) ⇒ File
Download a file Download a file by providing its path.
-
#download_file_with_http_info(path, opts = {}) ⇒ Array<(File, Integer, Hash)>
Download a file Download a file by providing its path.
-
#download_files(download_files, opts = {}) ⇒ Hash<String, Object>
Download multiple files Download multiple files by providing their paths.
-
#download_files_with_http_info(download_files, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Download multiple files Download multiple files by providing their paths.
-
#find_in_files(path, pattern, opts = {}) ⇒ Array<Match>
Find text in files Search for text pattern within files in a directory.
-
#find_in_files_with_http_info(path, pattern, opts = {}) ⇒ Array<(Array<Match>, Integer, Hash)>
Find text in files Search for text pattern within files in a directory.
-
#get_file_info(path, opts = {}) ⇒ FileInfo
Get file information Get detailed information about a file or directory.
-
#get_file_info_with_http_info(path, opts = {}) ⇒ Array<(FileInfo, Integer, Hash)>
Get file information Get detailed information about a file or directory.
-
#initialize(api_client = ApiClient.default) ⇒ FileSystemApi
constructor
A new instance of FileSystemApi.
-
#list_files(opts = {}) ⇒ Array<FileInfo>
List files and directories List files and directories in the specified path.
-
#list_files_with_http_info(opts = {}) ⇒ Array<(Array<FileInfo>, Integer, Hash)>
List files and directories List files and directories in the specified path.
-
#move_file(source, destination, opts = {}) ⇒ nil
Move or rename file/directory Move or rename a file or directory from source to destination.
-
#move_file_with_http_info(source, destination, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Move or rename file/directory Move or rename a file or directory from source to destination.
-
#replace_in_files(request, opts = {}) ⇒ Array<ReplaceResult>
Replace text in files Replace text pattern with new value in multiple files.
-
#replace_in_files_with_http_info(request, opts = {}) ⇒ Array<(Array<ReplaceResult>, Integer, Hash)>
Replace text in files Replace text pattern with new value in multiple files.
-
#search_files(path, pattern, opts = {}) ⇒ SearchFilesResponse
Search files by pattern Search for files matching a specific pattern in a directory.
-
#search_files_with_http_info(path, pattern, opts = {}) ⇒ Array<(SearchFilesResponse, Integer, Hash)>
Search files by pattern Search for files matching a specific pattern in a directory.
-
#set_file_permissions(path, opts = {}) ⇒ nil
Set file permissions Set file permissions, ownership, and group for a file or directory.
-
#set_file_permissions_with_http_info(path, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Set file permissions Set file permissions, ownership, and group for a file or directory.
-
#upload_file(path, file, opts = {}) ⇒ Hash<String, Object>
Upload a file Upload a file to the specified path.
-
#upload_file_with_http_info(path, file, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Upload a file Upload a file to the specified path.
-
#upload_files(opts = {}) ⇒ nil
Upload multiple files Upload multiple files with their destination paths.
-
#upload_files_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Upload multiple files Upload multiple files with their destination paths.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ FileSystemApi
Returns a new instance of FileSystemApi.
19 20 21 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_folder(path, mode, opts = {}) ⇒ nil
Create a folder Create a folder with the specified path and optional permissions
28 29 30 31 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 28 def create_folder(path, mode, opts = {}) create_folder_with_http_info(path, mode, opts) nil end |
#create_folder_with_http_info(path, mode, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Create a folder Create a folder with the specified path and optional permissions
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 39 def create_folder_with_http_info(path, mode, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FileSystemApi.create_folder ...' end # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? fail ArgumentError, "Missing the required parameter 'path' when calling FileSystemApi.create_folder" end # verify the required parameter 'mode' is set if @api_client.config.client_side_validation && mode.nil? fail ArgumentError, "Missing the required parameter 'mode' when calling FileSystemApi.create_folder" end # resource path local_var_path = '/files/folder' # query parameters query_params = opts[:query_params] || {} query_params[:'path'] = path query_params[:'mode'] = mode # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FileSystemApi.create_folder", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FileSystemApi#create_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_file(path, opts = {}) ⇒ nil
Delete a file or directory Delete a file or directory at the specified path
97 98 99 100 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 97 def delete_file(path, opts = {}) delete_file_with_http_info(path, opts) nil end |
#delete_file_with_http_info(path, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a file or directory Delete a file or directory at the specified path
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 108 def delete_file_with_http_info(path, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FileSystemApi.delete_file ...' end # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? fail ArgumentError, "Missing the required parameter 'path' when calling FileSystemApi.delete_file" end # resource path local_var_path = '/files' # query parameters query_params = opts[:query_params] || {} query_params[:'path'] = path query_params[:'recursive'] = opts[:'recursive'] if !opts[:'recursive'].nil? # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FileSystemApi.delete_file", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FileSystemApi#delete_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#download_file(path, opts = {}) ⇒ File
Download a file Download a file by providing its path
161 162 163 164 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 161 def download_file(path, opts = {}) data, _status_code, _headers = download_file_with_http_info(path, opts) data end |
#download_file_with_http_info(path, opts = {}) ⇒ Array<(File, Integer, Hash)>
Download a file Download a file by providing its path
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 171 def download_file_with_http_info(path, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FileSystemApi.download_file ...' end # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? fail ArgumentError, "Missing the required parameter 'path' when calling FileSystemApi.download_file" end # resource path local_var_path = '/files/download' # query parameters query_params = opts[:query_params] || {} query_params[:'path'] = path # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'File' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FileSystemApi.download_file", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FileSystemApi#download_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#download_files(download_files, opts = {}) ⇒ Hash<String, Object>
Download multiple files Download multiple files by providing their paths
225 226 227 228 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 225 def download_files(download_files, opts = {}) data, _status_code, _headers = download_files_with_http_info(download_files, opts) data end |
#download_files_with_http_info(download_files, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Download multiple files Download multiple files by providing their paths
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 235 def download_files_with_http_info(download_files, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FileSystemApi.download_files ...' end # verify the required parameter 'download_files' is set if @api_client.config.client_side_validation && download_files.nil? fail ArgumentError, "Missing the required parameter 'download_files' when calling FileSystemApi.download_files" end # resource path local_var_path = '/files/bulk-download' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(download_files) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FileSystemApi.download_files", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FileSystemApi#download_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#find_in_files(path, pattern, opts = {}) ⇒ Array<Match>
Find text in files Search for text pattern within files in a directory
294 295 296 297 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 294 def find_in_files(path, pattern, opts = {}) data, _status_code, _headers = find_in_files_with_http_info(path, pattern, opts) data end |
#find_in_files_with_http_info(path, pattern, opts = {}) ⇒ Array<(Array<Match>, Integer, Hash)>
Find text in files Search for text pattern within files in a directory
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 305 def find_in_files_with_http_info(path, pattern, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FileSystemApi.find_in_files ...' end # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? fail ArgumentError, "Missing the required parameter 'path' when calling FileSystemApi.find_in_files" end # verify the required parameter 'pattern' is set if @api_client.config.client_side_validation && pattern.nil? fail ArgumentError, "Missing the required parameter 'pattern' when calling FileSystemApi.find_in_files" end # resource path local_var_path = '/files/find' # query parameters query_params = opts[:query_params] || {} query_params[:'path'] = path query_params[:'pattern'] = pattern # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<Match>' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FileSystemApi.find_in_files", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FileSystemApi#find_in_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_file_info(path, opts = {}) ⇒ FileInfo
Get file information Get detailed information about a file or directory
364 365 366 367 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 364 def get_file_info(path, opts = {}) data, _status_code, _headers = get_file_info_with_http_info(path, opts) data end |
#get_file_info_with_http_info(path, opts = {}) ⇒ Array<(FileInfo, Integer, Hash)>
Get file information Get detailed information about a file or directory
374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 374 def get_file_info_with_http_info(path, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FileSystemApi.get_file_info ...' end # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? fail ArgumentError, "Missing the required parameter 'path' when calling FileSystemApi.get_file_info" end # resource path local_var_path = '/files/info' # query parameters query_params = opts[:query_params] || {} query_params[:'path'] = path # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'FileInfo' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FileSystemApi.get_file_info", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FileSystemApi#get_file_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_files(opts = {}) ⇒ Array<FileInfo>
List files and directories List files and directories in the specified path
428 429 430 431 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 428 def list_files(opts = {}) data, _status_code, _headers = list_files_with_http_info(opts) data end |
#list_files_with_http_info(opts = {}) ⇒ Array<(Array<FileInfo>, Integer, Hash)>
List files and directories List files and directories in the specified path
438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 438 def list_files_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FileSystemApi.list_files ...' end # resource path local_var_path = '/files' # query parameters query_params = opts[:query_params] || {} query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<FileInfo>' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FileSystemApi.list_files", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FileSystemApi#list_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#move_file(source, destination, opts = {}) ⇒ nil
Move or rename file/directory Move or rename a file or directory from source to destination
489 490 491 492 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 489 def move_file(source, destination, opts = {}) move_file_with_http_info(source, destination, opts) nil end |
#move_file_with_http_info(source, destination, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Move or rename file/directory Move or rename a file or directory from source to destination
500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 500 def move_file_with_http_info(source, destination, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FileSystemApi.move_file ...' end # verify the required parameter 'source' is set if @api_client.config.client_side_validation && source.nil? fail ArgumentError, "Missing the required parameter 'source' when calling FileSystemApi.move_file" end # verify the required parameter 'destination' is set if @api_client.config.client_side_validation && destination.nil? fail ArgumentError, "Missing the required parameter 'destination' when calling FileSystemApi.move_file" end # resource path local_var_path = '/files/move' # query parameters query_params = opts[:query_params] || {} query_params[:'source'] = source query_params[:'destination'] = destination # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FileSystemApi.move_file", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FileSystemApi#move_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#replace_in_files(request, opts = {}) ⇒ Array<ReplaceResult>
Replace text in files Replace text pattern with new value in multiple files
557 558 559 560 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 557 def replace_in_files(request, opts = {}) data, _status_code, _headers = replace_in_files_with_http_info(request, opts) data end |
#replace_in_files_with_http_info(request, opts = {}) ⇒ Array<(Array<ReplaceResult>, Integer, Hash)>
Replace text in files Replace text pattern with new value in multiple files
567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 567 def replace_in_files_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FileSystemApi.replace_in_files ...' end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling FileSystemApi.replace_in_files" end # resource path local_var_path = '/files/replace' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request) # return_type return_type = opts[:debug_return_type] || 'Array<ReplaceResult>' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FileSystemApi.replace_in_files", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FileSystemApi#replace_in_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#search_files(path, pattern, opts = {}) ⇒ SearchFilesResponse
Search files by pattern Search for files matching a specific pattern in a directory
626 627 628 629 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 626 def search_files(path, pattern, opts = {}) data, _status_code, _headers = search_files_with_http_info(path, pattern, opts) data end |
#search_files_with_http_info(path, pattern, opts = {}) ⇒ Array<(SearchFilesResponse, Integer, Hash)>
Search files by pattern Search for files matching a specific pattern in a directory
637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 637 def search_files_with_http_info(path, pattern, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FileSystemApi.search_files ...' end # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? fail ArgumentError, "Missing the required parameter 'path' when calling FileSystemApi.search_files" end # verify the required parameter 'pattern' is set if @api_client.config.client_side_validation && pattern.nil? fail ArgumentError, "Missing the required parameter 'pattern' when calling FileSystemApi.search_files" end # resource path local_var_path = '/files/search' # query parameters query_params = opts[:query_params] || {} query_params[:'path'] = path query_params[:'pattern'] = pattern # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SearchFilesResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FileSystemApi.search_files", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FileSystemApi#search_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#set_file_permissions(path, opts = {}) ⇒ nil
Set file permissions Set file permissions, ownership, and group for a file or directory
699 700 701 702 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 699 def (path, opts = {}) (path, opts) nil end |
#set_file_permissions_with_http_info(path, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Set file permissions Set file permissions, ownership, and group for a file or directory
712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 712 def (path, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FileSystemApi.set_file_permissions ...' end # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? fail ArgumentError, "Missing the required parameter 'path' when calling FileSystemApi.set_file_permissions" end # resource path local_var_path = '/files/permissions' # query parameters query_params = opts[:query_params] || {} query_params[:'path'] = path query_params[:'owner'] = opts[:'owner'] if !opts[:'owner'].nil? query_params[:'group'] = opts[:'group'] if !opts[:'group'].nil? query_params[:'mode'] = opts[:'mode'] if !opts[:'mode'].nil? # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FileSystemApi.set_file_permissions", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FileSystemApi#set_file_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#upload_file(path, file, opts = {}) ⇒ Hash<String, Object>
Upload a file Upload a file to the specified path
768 769 770 771 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 768 def upload_file(path, file, opts = {}) data, _status_code, _headers = upload_file_with_http_info(path, file, opts) data end |
#upload_file_with_http_info(path, file, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Upload a file Upload a file to the specified path
779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 779 def upload_file_with_http_info(path, file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FileSystemApi.upload_file ...' end # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? fail ArgumentError, "Missing the required parameter 'path' when calling FileSystemApi.upload_file" end # verify the required parameter 'file' is set if @api_client.config.client_side_validation && file.nil? fail ArgumentError, "Missing the required parameter 'file' when calling FileSystemApi.upload_file" end # resource path local_var_path = '/files/upload' # query parameters query_params = opts[:query_params] || {} query_params[:'path'] = path # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['multipart/form-data']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} form_params['file'] = file # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FileSystemApi.upload_file", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FileSystemApi#upload_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#upload_files(opts = {}) ⇒ nil
Upload multiple files Upload multiple files with their destination paths
842 843 844 845 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 842 def upload_files(opts = {}) upload_files_with_http_info(opts) nil end |
#upload_files_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Upload multiple files Upload multiple files with their destination paths
851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 |
# File 'lib/daytona_toolbox_api_client/api/file_system_api.rb', line 851 def upload_files_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FileSystemApi.upload_files ...' end # resource path local_var_path = '/files/bulk-upload' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"FileSystemApi.upload_files", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FileSystemApi#upload_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |