aboutsummaryrefslogtreecommitdiff
path: root/CPP/Windows/FileDir.h
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/Windows/FileDir.h')
-rw-r--r--CPP/Windows/FileDir.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/CPP/Windows/FileDir.h b/CPP/Windows/FileDir.h
index 573ffa2..74675ee 100644
--- a/CPP/Windows/FileDir.h
+++ b/CPP/Windows/FileDir.h
@@ -41,7 +41,26 @@ int my_chown(CFSTR path, uid_t owner, gid_t group);
41bool SetFileAttrib_PosixHighDetect(CFSTR path, DWORD attrib); 41bool SetFileAttrib_PosixHighDetect(CFSTR path, DWORD attrib);
42 42
43 43
44#ifndef _WIN32
45#define PROGRESS_CONTINUE 0
46#define PROGRESS_CANCEL 1
47// #define PROGRESS_STOP 2
48// #define PROGRESS_QUIET 3
49#endif
50Z7_PURE_INTERFACES_BEGIN
51DECLARE_INTERFACE(ICopyFileProgress)
52{
53 // in: total, current: include all/processed alt streams.
54 // it returns PROGRESS_CONTINUE or PROGRESS_CANCEL.
55 virtual DWORD CopyFileProgress(UInt64 total, UInt64 current) = 0;
56};
57Z7_PURE_INTERFACES_END
58
44bool MyMoveFile(CFSTR existFileName, CFSTR newFileName); 59bool MyMoveFile(CFSTR existFileName, CFSTR newFileName);
60// (progress == NULL) is allowed
61bool MyMoveFile_with_Progress(CFSTR oldFile, CFSTR newFile,
62 ICopyFileProgress *progress);
63
45 64
46#ifndef UNDER_CE 65#ifndef UNDER_CE
47bool MyCreateHardLink(CFSTR newFileName, CFSTR existFileName); 66bool MyCreateHardLink(CFSTR newFileName, CFSTR existFileName);
@@ -87,7 +106,9 @@ public:
87 bool Create(CFSTR pathPrefix, NIO::COutFile *outFile); // pathPrefix is not folder prefix 106 bool Create(CFSTR pathPrefix, NIO::COutFile *outFile); // pathPrefix is not folder prefix
88 bool CreateRandomInTempFolder(CFSTR namePrefix, NIO::COutFile *outFile); 107 bool CreateRandomInTempFolder(CFSTR namePrefix, NIO::COutFile *outFile);
89 bool Remove(); 108 bool Remove();
90 bool MoveTo(CFSTR name, bool deleteDestBefore); 109 // bool MoveTo(CFSTR name, bool deleteDestBefore);
110 bool MoveTo(CFSTR name, bool deleteDestBefore,
111 ICopyFileProgress *progress);
91}; 112};
92 113
93 114