AWS SDK for C++  0.14.3
AWS SDK for C++
FileSystemUtils.h
Go to the documentation of this file.
1 /*
2  * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 #pragma once
16 #include <aws/core/Core_EXPORTS.h>
19 
20 #include <fstream>
21 
22 namespace Aws
23 {
24  namespace Utils
25  {
26 
28  {
29  public:
30  FStreamWithFileName(const Aws::String& fileName, std::ios_base::openmode openFlags) :
31  Aws::FStream(fileName.c_str(), openFlags), m_fileName(fileName) {}
32 
33  virtual ~FStreamWithFileName() = default;
34 
35  const Aws::String& GetFileName() const { return m_fileName; }
36  protected:
38  };
39 
44  {
45  public:
50  TempFile(const char* prefix, const char* suffix, std::ios_base::openmode openFlags);
55  TempFile(const char* prefix, std::ios_base::openmode openFlags);
59  TempFile(std::ios_base::openmode openFlags);
60 
61  ~TempFile();
62  };
63 
64  }
65 }
FStreamWithFileName(const Aws::String &fileName, std::ios_base::openmode openFlags)
const Aws::String & GetFileName() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
std::basic_fstream< char, std::char_traits< char > > FStream
Definition: AWSStreamFwd.h:29
#define AWS_CORE_API
Definition: Core_EXPORTS.h:35
JSON (JavaScript Object Notation).