文件路径有关函数

BOOL PathMatchSpec(LPCSTR pszFile,  LPCSTR pszSpec);

Searches a string using a Microsoft MS-DOS wild card match type.

 

BOOL PathIsPrefix(INLPCTSTR pszPrefix, INLPCTSTR pszPath);

Searches a path to determine if it contains a valid prefix of the type passed by pszPrefix. A prefix is one of these types: "C:\\", ".", "..", "..\\".

 

BOOL PathIsRelative(LPCTSTR lpszPath);

Searches a path and determines if it is relative.

 

BOOL PathIsSameRoot(LPCTSTR pszPath1, LPCTSTR pszPath2);

Compares two paths to determine if they have a common root component.

 

BOOL PathIsFileSpec(LPCTSTR lpszPath);

Searches a path for any path-delimiting characters (for example, ':' or '\' ). If there are no path-delimiting characters present, the path is considered to be a File Spec path.

 

BOOL PathIsDirectoryEmpty(LPCTSTR pszPath);

Determines whether a specified path is an empty directory.

 

BOOL PathIsDirectory(LPCTSTR pszPath);

Verifies that a path is a valid directory.

 

BOOL PathFileExists(LPCTSTR pszPath);

Determines whether a path to a file system object such as a file or directory is valid.

 

LPTSTR PathFindExtension(LPCTSTR pPath);

Searches a path for an extension.

 

 

LPTSTR PathFindFileName(LPCTSTR pPath);

Searches a path for a file name.

 

BOOL PathAppend(LPTSTR pszPath,LPCTSTR pszMore);

Appends one path to the end of another.

 

BOOL PathAddExtension(LPTSTR pszPath,LPCTSTR pszExtension);

Adds a file extension to a path string.

 

LPTSTR PathAddBackslash(LPTSTR lpszPath);

Adds a backslash to the end of a string to create the correct syntax for a path. If the source path already has a trailing backslash, no backslash will be added.

 

void PathRemoveBlanks(LPTSTR lpszString);

Removes all leading and trailing spaces from a string.

 

 

void PathRemoveExtension(LPTSTR pszPath);

Removes the file extension from a path, if one is present.

 

BOOL PathRemoveFileSpec(LPTSTR pszPath);

Removes the trailing file name and backslash from a path, if they are present.

 

BOOL SHGetSpecialFolderPath(HWND hwndOwner,LPTSTR lpszPath, int nFolder, BOOL fCreate);

Retrieves the path of a special folder, identified by its CSIDL.

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值