Sha256: d41f861ec845cde9712d22a3e90a55783e3c56ea9fb01e265fa0aa504fe78c5b

Contents?: true

Size: 739 Bytes

Versions: 16

Compression:

Stored size: 739 Bytes

Contents

#pragma once

#include <string>
#include <boost/filesystem/path.hpp>

/**
 * Class to create a temporary directory with a unique name
 * and destroy it once it is no longer needed.
 * */
class temp_directory {

public:
    temp_directory();
    ~temp_directory();
    std::string const& get_dir_name() const;

private:
    std::string dir_name;

};

/**
 * Class to create a temporary file with a unique name and
 * destroy it once it is no longer needed.
 */
class temp_file {

public:
    temp_file(std::string const& content);
    ~temp_file();
    std::string const& get_file_name() const;

private:
    std::string file_name;

};

/** Generates a unique string for use as a file path. */
boost::filesystem::path unique_fixture_path();

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
facter-3.12.2.cfacter.20181217 ext/facter/leatherman/file_util/tests/fixtures.hpp
facter-3.12.1.cfacter.20181031 ext/facter/leatherman/file_util/tests/fixtures.hpp
facter-3.11.6.cfacter.20181031 ext/facter/leatherman/file_util/tests/fixtures.hpp
facter-3.12.1.cfacter.20181023 ext/facter/leatherman/file_util/tests/fixtures.hpp
facter-3.11.5.cfacter.20181022 ext/facter/leatherman/file_util/tests/fixtures.hpp
facter-3.12.0.cfacter.20181004 ext/facter/leatherman/file_util/tests/fixtures.hpp
facter-3.12.0.cfacter.20181001 ext/facter/leatherman/file_util/tests/fixtures.hpp
facter-3.12.0.cfacter.20180918 ext/facter/leatherman/file_util/tests/fixtures.hpp
facter-3.11.4.cfacter.20180821 ext/facter/leatherman/file_util/tests/fixtures.hpp
facter-3.11.3.cfacter.20180716 ext/facter/leatherman/file_util/tests/fixtures.hpp
facter-3.11.2.cfacter.20180612 ext/facter/leatherman/file_util/tests/fixtures.hpp
facter-3.9.6.cfacter.20180612 ext/facter/leatherman/file_util/tests/fixtures.hpp
facter-3.11.2.cfacter.20180606 ext/facter/leatherman/file_util/tests/fixtures.hpp
facter-3.9.6.cfacter.20180606 ext/facter/leatherman/file_util/tests/fixtures.hpp
facter-3.11.0.cfacter.20180319 ext/facter/leatherman/file_util/tests/fixtures.hpp
cfacter-3.11.0.rc.20180314 ext/facter/leatherman/file_util/tests/fixtures.hpp