blob: 24923dd6e40768e5e6d7239798e2ea392db03a5b [file] [log] [blame]
Constantin Kaplinsky729598c2006-05-25 05:12:25 +00001/* Copyright (C) 2005 TightVNC Team. All Rights Reserved.
2 *
3 * Developed by Dennis Syrovatsky.
4 *
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
29#include <windows.h>
30
31#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);
42
43 bool renameIt(char *pOldName, char *pNewName);
44 bool renameIt(char *pPath, char *pOldName, char *pNewName);
45
46 bool deleteIt(char *pPrefix, FileInfo *pFI);
47 bool deleteIt(char *pFullPath);
48 bool deleteIt(FileInfo *pFI);
49
50 bool getInfo(char *pFullPath, FILEINFO *pFIStruct);
51
52 bool getDirInfo(char *pPath, FileInfo *pFileInfo, unsigned int dirOnly);
53 bool getDrivesInfo(FileInfo *pFI);
54
55 unsigned int getTime70(FILETIME ftime);
56 void getFiletime(unsigned int time70, FILETIME *pftime);
57
58 bool getDirSize(char *pFullPath, DWORD64 *dirSize);
59
60 private:
61 bool getFolderInfoWithPrefix(char *pPrefix, FileInfo *pFileInfo);
62 };
63 }
64}
65
66#endif // __RFB_WIN32_FOLDERMANAGER_H__