0a8170f52a
* Added IsDirectory function to SystemFile This takes the implementation in LocalFileIO and uses it for SystemFile and then just has LocalFileIO call the SystemFile implementation Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Fixed logic to detect the WinApi FILE_ATTRIBUTE_DIRECTORY attribute Updated the FileIO.cpp test to use AZ::IO::Path and removed direct uses of AZStd::string Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Adding googletest printers for string and Path classes Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Updated the SystemFile_WinAPI functions to use AZStd::to_wstring This makes the the SystemFile function convert from UTF-8 to UTF-16 Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
35 lines
1012 B
C++
35 lines
1012 B
C++
/*
|
|
* Copyright (c) Contributors to the Open 3D Engine Project.
|
|
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
*
|
|
*/
|
|
#pragma once
|
|
|
|
#include <ostream>
|
|
#include <string_view>
|
|
#include <AzCore/std/string/string.h>
|
|
#include <AzCore/std/string/fixed_string.h>
|
|
|
|
namespace AZStd
|
|
{
|
|
template<class Element, class Traits, class Allocator>
|
|
void PrintTo(const AZStd::basic_string<Element, Traits, Allocator>& value, ::std::ostream* os)
|
|
{
|
|
*os << value.c_str();
|
|
}
|
|
|
|
template<class Element, class Traits>
|
|
void PrintTo(const AZStd::basic_string_view<Element, Traits>& value, ::std::ostream* os)
|
|
{
|
|
*os << ::std::string_view(value.data(), value.size());
|
|
}
|
|
|
|
template <class Element, size_t MaxElementCount, class Traits>
|
|
void PrintTo(const AZStd::basic_fixed_string<Element, MaxElementCount, Traits>& value, ::std::ostream* os)
|
|
{
|
|
*os << value.c_str();
|
|
}
|
|
}
|