1 //===-- MIUtilFileStd.h -----------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 // File: MIUtilFileStd.h
13 // Overview: CMIUtilFileStd interface.
15 // Environment: Compilers: Visual C++ 12.
16 // gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
17 // Libraries: See MIReadmetxt.
25 #include "MIUtilString.h"
26 #include "MICmnBase.h"
28 //++ ============================================================================
29 // Details: MI common code utility class. File handling.
31 // Authors: Aidan Dodds 10/03/2014.
34 class CMIUtilFileStd : public CMICmnBase
38 static MIchar GetSlash(void);
42 /* ctor */ CMIUtilFileStd(void);
44 bool CreateWrite(const CMIUtilString &vFileNamePath, bool &vwrbNewCreated);
45 bool Write(const CMIUtilString &vData);
46 bool Write(const MIchar *vpData, const MIuint vCharCnt);
48 bool IsOk(void) const;
49 bool IsFileExist(const CMIUtilString &vFileNamePath) const;
50 const CMIUtilString &GetLineReturn(void) const;
51 CMIUtilString StripOffFileName(const CMIUtilString &vDirectoryPath) const;
56 /* dtor */ virtual ~CMIUtilFileStd(void);
60 CMIUtilString m_fileNamePath;
62 CMIUtilString m_constCharNewLine;
63 bool m_bFileError; // True = have a file error ATM, false = all ok