Tool: Read a file
See also
Other Tools:
btw_tool_docs_package_news()
,
btw_tool_env_describe_data_frame()
,
btw_tool_env_describe_environment()
,
btw_tool_files_list_files()
,
btw_tool_ide_read_current_editor()
,
btw_tool_package_docs
,
btw_tool_search_packages()
,
btw_tool_session_package_info()
,
btw_tool_session_platform_info()
,
btw_tools()
Examples
withr::with_tempdir({
write.csv(mtcars, "mtcars.csv")
btw_tool_files_read_text_file("mtcars.csv", max_lines = 5)
})
#> <btw::BtwTextFileToolResult>
#> @ value : chr [1:7] "```csv" ...
#> @ error : NULL
#> @ extra :List of 1
#> .. $ path: 'fs_path' chr "mtcars.csv"
#> @ request: NULL