139 using iterator_category = std::input_iterator_tag;
145 directory_iterator();
146 directory_iterator(
const directory_iterator&) =
default;
147 directory_iterator(directory_iterator&&) =
default;
149 directory_iterator& operator ++();
150 directory_iterator operator ++(
int32);
151 value_type operator *()
const;
154 bool equals(
const directory_iterator&
other)
const noexcept override;
171 explicit file_iterator(
const std::string&
path,
const std::string& pattern);
174 using iterator_category = std::input_iterator_tag;
181 file_iterator(
const file_iterator&) =
default;
182 file_iterator(file_iterator&&) =
default;
184 file_iterator& operator ++();
185 file_iterator operator ++(
int32);
186 value_type operator *()
const;
189 bool equals(
const file_iterator&
other)
const noexcept override;
206 explicit file_system_info_iterator(
const std::string&
path,
const std::string& pattern);
209 using iterator_category = std::input_iterator_tag;
215 file_system_info_iterator();
216 file_system_info_iterator(
const file_system_info_iterator&) =
default;
217 file_system_info_iterator(file_system_info_iterator&&) =
default;
219 file_system_info_iterator& operator ++();
220 file_system_info_iterator operator ++(
int32);
221 value_type operator *()
const;
224 bool equals(
const file_system_info_iterator&
other)
const noexcept override;
340 [[nodiscard]]
auto exists() const ->
bool override;
366 [[nodiscard]] auto
name() const ->
xtd::
string override;
Contains xtd::array class.
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:64
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:23
virtual bool equals(const directory_iterator &) const noexcept=0
Represent directory iterator used by xtd::io::directory_info.
Definition directory_info.hpp:133
Represent file iterator used by xtd::io::directory_info.
Definition directory_info.hpp:168
Represent file system iterator used by xtd::io::directory_info.
Definition directory_info.hpp:203
Exposes instance methods for creating, moving, and enumerating through directories and subdirectories...
Definition directory_info.hpp:130
auto create() -> void
Creates a directory.
auto create_subdirectory(const xtd::string &path) const -> xtd::io::directory_info
Creates a subdirectory or subdirectories on the specified path. The specified path can be relative to...
auto parent() const -> xtd::io::directory_info
Gets the parent directory of a specified subdirectory.
auto enumerate_directories() const -> xtd::io::directory_info::directory_iterator
Returns an enumerable collection of directory information in the current directory.
auto root() const -> xtd::io::directory_info
Gets the root portion of the directory.
auto exists() const -> bool override
Gets a value indicating whether the directory exists.
directory_info(const xtd::string &path)
Initializes a new instance of the xtd::io::directory_info class on the specified path.
auto get_file_system_infos() const -> xtd::array< xtd::sptr< xtd::io::file_system_info > >
Returns an array of strongly typed xtd::io::file_system_info entries representing all the files and s...
auto enumerate_files() const -> xtd::io::directory_info::file_iterator
Returns an enumerable collection of file information in the current directory.
auto remove() const -> void override
Deletes this xtd::io::directory_info if it is empty.
auto get_directories() const -> xtd::array< xtd::io::directory_info >
Returns the subdirectories of the current directory.
auto move_to(const xtd::string &dest_dir_name) -> void
Moves a DirectoryInfo instance and its contents to a new path.
auto name() const -> xtd::string override
Gets the name of this xtd::io::directory_info instance.
auto get_files() const -> xtd::array< xtd::io::file_info >
Returns a file list from the current directory.
auto enumerate_file_system_infos() const -> xtd::io::directory_info::file_system_info_iterator
Returns an enumerable collection of file system information in the current directory.
static const directory_info empty
Represents the uninitialized xtd::io::directory_info object. This field is constant.
Definition directory_info.hpp:241
Exposes static methods for creating, moving, and enumerating through directories and subdirectories....
Definition directory.hpp:103
Provides static methods for the creation, copying, deletion, moving, and opening of files,...
Definition file_info.hpp:41
Provides the base class for both xtd::io::file_info and xtd::io::directory_info objects.
Definition file_system_info.hpp:87
file_system_info()=default
Initializes a new instance of the xtd::io::file_system_info class.
Performs operations on std::basic_string instances that contain file or directory path information....
Definition path.hpp:37
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
xtd::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
@ end
Specifies the end of a stream.
Definition seek_origin.hpp:22
@ begin
Specifies the beginning of a stream.
Definition seek_origin.hpp:18
@ other
The operating system is other.
Definition platform_id.hpp:60
Contains xtd::iequatable interface.
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
constexpr const_pointer data() const noexcept
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:201