137 [[nodiscard]] auto
exists() const ->
bool override;
366 [[nodiscard]] auto
name() const ->
xtd::
string override;
664 [[nodiscard]] auto
create() const -> std::ofstream;
709 auto
move_to(const
xtd::
string& dest_file_name,
bool overwrite) ->
void;
721 [[nodiscard]] auto
open(std::
ios::openmode mode) const -> std::fstream;
Exposes instance methods for creating, moving, and enumerating through directories and subdirectories...
Definition directory_info.hpp:130
auto create_text() const -> xtd::io::stream_writer
Creates a std::ofstream that writes a new text file.
static const file_info empty
Represents the uninitialized xtd::io::file_info object. This field is constant.
Definition file_info.hpp:47
auto is_read_only() const -> bool
Gets a value that determines if the current file is read only.
auto exists() const -> bool override
Gets a value indicating whether a file exists.
auto length() const -> xtd::size
Gets the size, in bytes, of the current file.
auto remove() const -> void override
Permanently deletes a file.
auto open_write() const -> std::ofstream
Creates a write-only std::ofstream.
auto open(std::ios::openmode mode) const -> std::fstream
Opens a file in the specified mode.
auto move_to(const xtd::string &dest_file_name) -> void
Moves a specified file to a new location, providing the option to specify a new file name.
auto open_read() const -> std::ifstream
Creates a read-only std::ifstream.
auto directory() const -> xtd::io::directory_info
Gets an instance of the parent directory.
file_info(const xtd::string &file_name)
Initializes a new instance of the xtd::io::file_info class, which acts as a wrapper for a file path.
auto copy_to(const xtd::string &dest_file_name) const -> xtd::io::file_info
Copies an existing file to a new file, disallowing the overwriting of an existing file.
auto name() const -> xtd::string override
Gets the name of the file.
auto open_text() const -> xtd::io::stream_reader
Creates a xtd::io::stream_reader that reads from an existing text file.
auto append_text() const -> xtd::io::stream_writer
Creates a xtd::io::stream_writer that appends text to the file represented by this instance of the xt...
auto directory_name() const -> xtd::string
Gets a string representing the directory's full path.
auto create() const -> std::ofstream
Creates a file.
auto replace(const xtd::string &destination_file_name, const xtd::string &destination_backup_file_name) -> file_info
Replaces the contents of a specified file with the file described by the current xtd::io::file_info o...
Provides the base class for both xtd::io::file_info and xtd::io::directory_info objects.
Definition file_system_info.hpp:87
Implements a xtd::io::text_reader that reads characters from a byte stream.
Definition stream_reader.hpp:28
Implements a xtd::io::text_writer for writing characters to a stream.
Definition stream_writer.hpp:28
Contains xtd::io::file_system_info class.
#define core_export_
Define shared library export.
Definition core_export.hpp:13
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
@ ios
The operating system is iOS Apple.
Definition platform_id.hpp:36
The xtd::io namespace contains types that allow reading and writing to files and data streams,...
Definition binary_reader.hpp:17
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::io::stream_reader class.
Contains xtd::io::stream_writer class.