Lhaz
lhazprocfile.h
[詳解]
1 /*==========================================================================*/
2 /* Lhaz 処理対象ファイル chitora48@gmail.com */
3 /*==========================================================================*/
4 #pragma once
5 
6 #include "altstr.hpp"
7 #include <tchar.h>
8 #include <windows.h>
9 #include "lhazarc.h"
10 
11 class LHAZPROCFILE {
12 public:
14  File = file;
15  QuotedFile = _T("¥"");
16  QuotedFile += file;
17  QuotedFile += _T("¥"");
18  Type = type;
19  Total = 0;
20  MakeDir = true;
21  };
22  const WSTR& GetFile(void) const { return File; }
23  const WSTR& GetQuotedFile(void) const { return QuotedFile; }
24  void SetFile(const WSTR& f) {
25  File = f;
26  QuotedFile = _T("¥"");
27  QuotedFile += f;
28  QuotedFile += _T("¥"");
29  }
30  ARCHIVE::TYPE GetType(void) const { return Type; }
31  operator WSTR() const { return File; }
32  operator LPCTSTR() const { return (LPCTSTR)File.CStr(); }
33  LONGLONG GetTotal(void) const { return Total; }
34  void SetTotal(LONGLONG total) { Total = total; }
35  bool GetMakeDir(void) const { return MakeDir; }
36  void SetMakeDir(bool b) { MakeDir = b; }
37  bool IsDir(void) const {
38  if (File.Length() == 0)
39  return false;
40  return ((GetFileAttributes(File.CStr()) & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY);
41  }
42 
43 private:
44  WSTR File;
45  WSTR QuotedFile;
47  LONGLONG Total;
48  bool MakeDir;
49 
50 };
Definition: lhazarc.h:29
Archive.
TYPE
Definition: lhazarc.h:28
LHAZPROCFILE(const WSTR &file, ARCHIVE::TYPE type=ARCHIVE::NON)
Definition: lhazprocfile.h:13
then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file
Definition: LICENSE.txt:110
bool GetMakeDir(void) const
Definition: lhazprocfile.h:35
WSTR QuotedFile
Definition: lhazprocfile.h:45
const WSTR & GetQuotedFile(void) const
Definition: lhazprocfile.h:23
void SetMakeDir(bool b)
Definition: lhazprocfile.h:36
void SetFile(const WSTR &f)
Definition: lhazprocfile.h:24
WSTR File
Definition: lhazprocfile.h:44
LONGLONG Total
Definition: lhazprocfile.h:47
ARCHIVE::TYPE GetType(void) const
Definition: lhazprocfile.h:30
void SetTotal(LONGLONG total)
Definition: lhazprocfile.h:34
LONGLONG GetTotal(void) const
Definition: lhazprocfile.h:33
Definition: WinUnit.h:350
Definition: lhazprocfile.h:11
bool MakeDir
Definition: lhazprocfile.h:48
const WSTR & GetFile(void) const
Definition: lhazprocfile.h:22
ARCHIVE::TYPE Type
Definition: lhazprocfile.h:46
bool IsDir(void) const
Definition: lhazprocfile.h:37