blob: 24923dd6e40768e5e6d7239798e2ea392db03a5b [file] [log] [blame]
Dennis Syrovatsky110e7ee2005-10-19 07:01:41 +00001/* Copyright (C) 2005 TightVNC Team. All Rights Reserved.
Dennis Syrovatskyf72f9fd2006-04-17 08:56:48 +00002 *
3 * Developed by Dennis Syrovatsky.
Dennis Syrovatsky110e7ee2005-10-19 07:01:41 +00004 *
5 * This is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This software is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this software; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18 * USA.
19 *
20 * TightVNC distribution homepage on the Web: http://www.tightvnc.com/
21 *
22 */
23
24// -=- FolderManager.h
25
26#ifndef __RFB_WIN32_FOLDERMANAGER_H__
27#define __RFB_WIN32_FOLDERMANAGER_H__
28
Dennis Syrovatsky514c3072005-10-19 07:34:40 +000029#include <windows.h>
30
Dennis Syrovatsky110e7ee2005-10-19 07:01:41 +000031#include <rfb/FileInfo.h>
32#include <rfb/DirManager.h>
33
34namespace rfb {
35 namespace win32{
36 class FolderManager : public DirManager {
37 public:
38 FolderManager();
39 ~FolderManager();
40
41 bool createDir(char *pFullPath);
Dennis Syrovatsky05c448f2005-10-26 01:10:22 +000042
43 bool renameIt(char *pOldName, char *pNewName);
Dennis Syrovatsky95509432005-12-14 16:42:33 +000044 bool renameIt(char *pPath, char *pOldName, char *pNewName);
Dennis Syrovatsky29440e82005-12-05 09:31:28 +000045
46 bool deleteIt(char *pPrefix, FileInfo *pFI);
Dennis Syrovatsky05c448f2005-10-26 01:10:22 +000047 bool deleteIt(char *pFullPath);
Dennis Syrovatsky29440e82005-12-05 09:31:28 +000048 bool deleteIt(FileInfo *pFI);
Dennis Syrovatsky05c448f2005-10-26 01:10:22 +000049
50 bool getInfo(char *pFullPath, FILEINFO *pFIStruct);
Dennis Syrovatsky110e7ee2005-10-19 07:01:41 +000051
Dennis Syrovatskyf3c57662005-11-02 03:53:04 +000052 bool getDirInfo(char *pPath, FileInfo *pFileInfo, unsigned int dirOnly);
Dennis Syrovatsky84ea20f2005-10-19 07:46:31 +000053 bool getDrivesInfo(FileInfo *pFI);
Dennis Syrovatskyf3c57662005-11-02 03:53:04 +000054
Dennis Syrovatsky05c448f2005-10-26 01:10:22 +000055 unsigned int getTime70(FILETIME ftime);
56 void getFiletime(unsigned int time70, FILETIME *pftime);
57
Dennis Syrovatskyc4ed9b72005-11-28 07:10:27 +000058 bool getDirSize(char *pFullPath, DWORD64 *dirSize);
59
Dennis Syrovatskyf3c57662005-11-02 03:53:04 +000060 private:
61 bool getFolderInfoWithPrefix(char *pPrefix, FileInfo *pFileInfo);
Dennis Syrovatsky110e7ee2005-10-19 07:01:41 +000062 };
63 }
64}
65
66#endif // __RFB_WIN32_FOLDERMANAGER_H__