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>
28 lines
866 B
C++
28 lines
866 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
|
|
*
|
|
*/
|
|
#include <ostream>
|
|
#include <AzCore/IO/Path/Path.h>
|
|
|
|
namespace AZ::IO
|
|
{
|
|
void PrintTo(const AZ::IO::PathView& path, ::std::ostream* os)
|
|
{
|
|
*os << "path: " << AZ::IO::Path(path.Native(), AZ::IO::PosixPathSeparator).MakePreferred().c_str();
|
|
}
|
|
|
|
void PrintTo(const AZ::IO::Path& path, ::std::ostream* os)
|
|
{
|
|
*os << "path: " << AZ::IO::Path(path.Native(), AZ::IO::PosixPathSeparator).MakePreferred().c_str();
|
|
}
|
|
|
|
void PrintTo(const AZ::IO::FixedMaxPath& path, ::std::ostream* os)
|
|
{
|
|
*os << "path: " << AZ::IO::FixedMaxPath(path.Native(), AZ::IO::PosixPathSeparator).MakePreferred().c_str();
|
|
}
|
|
}
|