18 Nisan 2017 Salı

filesystem path Sınıfı

Giriş
Şu satırı dahil ederiz.
#include <filesystem>
using namespace std::experimental::filesystem;
boost kütüphanesindeki path Sınıfı ile aynıdır. Bu sınıf ile boost arasındaki farkı anlatan bir yazı burada.

Constructor
Şöyle yaparız.
std::experimental::filesystem::path path("...");
exists metodu
Açıklaması şöyle
Checks if the given file status or path corresponds to an existing file or directory
Şöyle yaparız.
filesystem::exists(p.parent_path());
parent_path metodu
Açıklaması şöyle
Returns the path to the parent directory

Hiç yorum yok:

Yorum Gönder