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
12public:
13 LHAZPROCFILE(const WSTR& file, ARCHIVE::TYPE type = ARCHIVE::NON) {
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
43private:
44 WSTR File;
47 LONGLONG Total;
48 bool MakeDir;
49
50};
TYPE
Definition lhazarc.h:28
@ NON
Definition lhazarc.h:29
Definition lhazprocfile.h:11
void SetTotal(LONGLONG total)
Definition lhazprocfile.h:34
void SetMakeDir(bool b)
Definition lhazprocfile.h:36
void SetFile(const WSTR &f)
Definition lhazprocfile.h:24
LONGLONG Total
Definition lhazprocfile.h:47
bool MakeDir
Definition lhazprocfile.h:48
ARCHIVE::TYPE Type
Definition lhazprocfile.h:46
bool IsDir(void) const
Definition lhazprocfile.h:37
LHAZPROCFILE(const WSTR &file, ARCHIVE::TYPE type=ARCHIVE::NON)
Definition lhazprocfile.h:13
bool GetMakeDir(void) const
Definition lhazprocfile.h:35
const WSTR & GetFile(void) const
Definition lhazprocfile.h:22
WSTR File
Definition lhazprocfile.h:44
ARCHIVE::TYPE GetType(void) const
Definition lhazprocfile.h:30
WSTR QuotedFile
Definition lhazprocfile.h:45
const WSTR & GetQuotedFile(void) const
Definition lhazprocfile.h:23
LONGLONG GetTotal(void) const
Definition lhazprocfile.h:33
Definition WinUnit.h:351
Archive