VC++ MFC 创建多级目录的方法 MakeSureDirectoryPathExists (另附 文件、目录操作类)
来源:互联网 发布:数据展示平台网页 编辑:程序博客网 时间:2024/05/21 08:20
VC++ MFC 创建多级目录的方法 MakeSureDirectoryPathExists (另附
文件、目录操作类)
Files
BOOL FileExists( CString file )
Returns
TRUE
if the file ' file
' exists.BOOL CreateFile( CString file )
Creates the empty file '
file
'. If 'file
' contains a non-existing subdirectory, it will be created.BOOL CopyFile( CString sourceFile, CString destDirectory )
Copies '
sourceFile
' to 'destDirectory
'. 'destDirectory
' will be created if it doesn't exist.BOOL CopyFiles( CString sourceDirectory, CString destDirectory)
Copies all files from '
sourceDirectory
' to 'destDirectory
'. Subdirectories are not copied (useCopyDirectory
, described below, for this). 'destDirectory
' will be created if it doesn't exist.BOOL CopyFiles( CStringArray& files, CString destDirectory)
Copies the files in '
files
' to 'destDirectory
'. Either the filenames in 'files
' must be fully qualified or will be copied from the current directory. 'destDirectory
' will be created if it doesn't exist.
Directories
BOOL CreateDirectory( CString directory )
Creates '
directory
'. Subdirectories will also be created.BOOL CopyDirectory( CString sourceDirectory, CString destDirectory)
Copies the contents from '
sourceDirectory
' to 'destDirectory
'. Subdirectories will not be copied.BOOL EmptyDirectory( CString directory )
Deletes all files from '
directory
'. Subdirectories will not be emptied.BOOL
RemoveDirectory( CString directory ) Remove '
directory
' even if it is not empty. Will not remove subdirectories.BOOL CopyDirectories( CString sourceDirectory, CString destDirectory)
Copies the contents from '
sourceDirectory
' to 'destDirectory
'. Subdirectories will also be copied.BOOL EmptyDirectories( CString directory )
Deletes all files from '
directory
'. Subdirectories will also be emptied.BOOL RemoveDirectories( CString directory )
Removes '
directory
' even if it is not empty. Will also remove subdirectories.
Enumerations
BOOL EnumDirectories( CString sourceDirectory, CStringArray& directories )
Returns a list of all subdirectories in '
sourceDirectory
' in 'directories
'. Subdirectories will not be enumerated.BOOL EnumFilesInDirectoryWith
Filter( CString filter, CString sourceDirectory, CStringArray& files, int mode = EF_ONLY_FILENAMES) Returns a list of all files in '
sourceDirectory
' matching the filter in 'filter
' in 'files
'. If mode isEF_ONLY_FILENAMES
(default), only the filenames will be returned. If mode is EF_FULLY_QUALIFIED
, the filenames will contain the complete path. Subdirectories will not be searched.BOOL EnumFilesInDirectory( CString sourceDirectory, CStringArray& files, int mode = EF_ONLY_FILENAMES )
Returns a list of all files in '
sourceDirectory
' in 'files
'. If mode isEF_ONLY_FILENAMES
(default), only the filenames will be returned. If mode is EF_FULLY_QUALIFIED
, the filenames will contain the complete path.BOOL EnumAllFiles( CString sourceDirectory, CStringArray& files )
Returns a list of all files in '
sourceDirectory
' in 'files
'. The filenames will contain the complete path. Subdirectories will also be searched.BOOL EnumAllFilesWithFilter( CString filter, CString sourceDirectory, CStringArray& files )
Returns a list of all files in '
sourceDirectory
' in 'files
' matching 'filter
'. The filenames will contain the complete path. Subdirectories will also be searched.
Error handling
CString GetErrorMessage()
CDiskObject: Simplifying common disk operations
- VC++ MFC 创建多级目录的方法 MakeSureDirectoryPathExists (另附 文件、目录操作类)
- 使用MakeSureDirectoryPathExists 创建多级目录
- MFC 创建多级文件目录
- MFC创建多级目录
- MFC创建多级目录
- VC创建多级目录
- VC创建多级目录
- 使用 MakeSureDirectoryPathExists 迅速建立多级目录
- VC(MFC)判断文件/目录是否存在,创建目录
- 使用VC创建多级目录
- vc 一次创建多级目录
- c#创建多级目录的ZIP文件
- 创建多级文件夹/目录下的文件
- java创建多级目录文件
- 创建多级目录多级文件夹实现方法
- 【VC编程技巧】文件☞2.6Windows上多级目录的创建和删除
- MFC程序中如何创建多级目录
- VC中判断目录,文件是否存在,创建目录,求目录或文件大小的方法
- 记录NSLog要输出的格式化占位符
- onmousemove、onmouseover、 onmouseup及onclick的区别
- Linux / unbuntu 下安装python
- SqlServer递归查询
- Bootstrap 3.3.7学习笔记11
- VC++ MFC 创建多级目录的方法 MakeSureDirectoryPathExists (另附 文件、目录操作类)
- carbondata 安装文档
- python装饰器
- jQuery实现enter回车事件
- HTML5本地储存--Web Storage
- 数字安全转换算法(四舍五入)
- 引用react-native-scrollable-tab-view 之后Cannot read property 'style' of undefined问题
- 在Eclipse中使用Git
- JS基础