old_fsys.h
资源名称:warftpd.zip [点击查看]
上传用户:surprise9
上传日期:2007-01-04
资源大小:426k
文件大小:3k
源码类别:
Ftp客户端
开发平台:
Visual C++
- class DLL_WAR_DAEMON_ CFindFileHandle
- {
- public:
- HANDLE m_DOShandle;
- HANDLE m_SecurityHandle; // Handle to security descriptior for dir
- CCmdArgs *m_PathsQueued;
- int m_User;
- CString m_Pattern;
- CString m_FullPath;
- int m_Argc;
- public:
- CFindFileHandle();
- ~CFindFileHandle();
- };
- class DLL_WAR_DAEMON_ CFsys
- {
- public:
- static CLog *m_Log;
- virtual BOOL Create(CLog *Log);
- virtual void LogMsg(int flag, LPCSTR Format, ...);
- static CFsys *m_pCFsys;
- public:
- CFsys();
- ~CFsys();
- virtual LPCSTR VisualPath(LPCSTR RootPath, LPCSTR Path, LPSTR ReturnBuf, int BufLen = MAX_PATH);
- HANDLE FindFirstFile(int User, LPCSTR Path, LPWIN32_FIND_DATA Data);
- BOOL PrepereCommandLine(CCmdArgs& Args, LPCSTR RootDir, LPCSTR CWD, int User, ...);
- int AddFromPattern(CCmdArgs& Args, LPCSTR RootDir, LPCSTR CWD, int User, LPCSTR p);
- BOOL FindNextFile(HANDLE h, LPWIN32_FIND_DATA Data);
- BOOL FindClose(HANDLE h);
- void PrepereLogicalFile(LPCSTR Name, LPWIN32_FIND_DATA Data);
- LPCSTR MkPath(LPCSTR Root, LPCSTR CWD, LPCSTR Path, LPSTR buf);
- BOOL BldFileInfoList(int User, LPCSTR Root, CFileInfoList& FileList,
- LPCSTR Origin, LPCSTR Path, BOOL ListDir);
- int AddFileInfoListPath(int User, CFileInfoList& FileList, LPCSTR Path);
- LPCSTR RealPath(LPCSTR Path, LPSTR Buf, BOOL DotsOnly = FALSE);
- int chdir(int User, LPCSTR Root, CString& cCWD, LPCSTR Path);
- BOOL IsDirectory(int User, LPCSTR Path);
- BOOL IsPlainFile(int User, LPCSTR Path);
- static LPCSTR UnixPath(LPSTR Path);
- static LPCSTR DosPath(LPSTR Path);
- LPCSTR GetFullPath(int User, LPCSTR Root, LPCSTR CWD, LPCSTR Path, CString& cBuf, DWORD AccessFlags);
- virtual HANDLE CreateFile(LPCTSTR lpFileName, // pointer to name of the file
- DWORD dwDesiredAccess, // access (read-write) mode
- DWORD dwShareMode, // share mode
- LPSECURITY_ATTRIBUTES lpSecurityAttributes, // pointer to security descriptor
- DWORD dwCreationDistribution, // how to create
- DWORD dwFlagsAndAttributes, // file attributes
- HANDLE hTemplateFile // handle to file with attributes to copy
- );
- BOOL RenamePath(int User, LPCSTR OldPath, LPCSTR NewPath);
- BOOL DeletePath(int User, LPCSTR Path);
- BOOL MkDir(int User, LPCSTR Path);
- HANDLE GetSecurityHandle(HANDLE h);
- BOOL CheckPermission(int User, LPCSTR RootPath, LPCSTR Path, BOOL IsDir, int PermsWanted);
- int chmod(int User, LPCSTR Path, int SetMode = -1,
- int SetOwner = -1, int SetClass = -1, LPCSTR SetComment = NULL,
- int DefDirMode = -1, int DefFileMode = -1);
- static CFsys *GetFsys() {return m_pCFsys;}
- };