Showing content from https://gammasoft71.github.io/xtd/docs/documentation/guides/xtd.core/common_io_tasks below:
Common I/O Tasks | xtd
Common I/O Tasks
The xtd::io namespace provides several classes that allow for various actions, such as reading and writing, to be performed on files, directories, and streams. For more information, see File and Stream I/O.
Preamble
Prefer in your application to use the Input/output library and Filesystem library of the std.
xtd has its own IO API because the Filesystem library doesn't work on all OS (like for example iOS).
Some features exist only in the xtd API like binary reader/writer, stream reader/writer, string reader/writer and text reader/writer.
Common File Tasks To do this... See the example in this topic... Create a text file xtd::io::file::create_text method
xtd::io::file_info::create_text method
xtd::io::file::create method
xtd::io::file_info::create method Write to a text file How to: Write Text to a File
How to: Write a Text File Read from a text file How to: Read Text from a File Append text to a file How to: Open and Append to a Log File
xtd::io::file::append_text method
xtd::io::file_info.append_text method Rename or move a file xtd::io::file::move method
xtd::io::file_info::move_to method Delete a file xtd::io::file::remove method
xtd::io::file_info::remove method Copy a file xtd::io::file::copy method
xtd::io::file_info::copy_to method Get the size of a file xtd::io::file_info::length property Get the attributes of a file xtd::io::file::get_attributes method Set the attributes of a file xtd::io::file::set_attributes method Determine whether a file exists xtd::io::file::exists method Read from a binary file How to: Read and Write to a Newly Created Data File Write to a binary file How to: Read and Write to a Newly Created Data File Retrieve a file name extension xtd::io::path::get_extension method Retrieve the fully qualified path of a file xtd::io::path::get_full_path method Retrieve the file name and extension from a path xtd::io::path::get_file_name method Change the extension of a file xtd::io::path::change_extension method Common Directory Tasks To do this... See the example in this topic... Access a file in a special folder such as My Documents How to: Write Text to a File Create a directory xtd::io::directory::create_directory method
xtd::io::file_info::directory property Create a subdirectory xtd::io::directory_info.create_subdirectory method Rename or move a directory xtd::io::directory::move method
xtd::io::directory_info::move_to method Copy a directory How to: Copy Directories Delete a directory xtd::io::directory::remove method
xtd::io::directory_info::remove method See the files and subdirectories in a directory How to: Enumerate Directories and Files Find the size of a directory xtd::io::directory_info::length class Determine whether a directory exists xtd::io::directory::exists method See also
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4