美文网首页
ExpandUNCFileName - C++ Builder

ExpandUNCFileName - C++ Builder

作者: 玄坴 | 来源:发表于2021-11-07 15:21 被阅读0次

C++ Builder 参考手册System::SysutilsExpandUNCFileName


把相对路径转为完整路径,支持 UNC (Universal Naming Convention) 格式

头文件:#include <System.SysUtils.hpp>
命名空间:System::Sysutils
函数原型:

System::UnicodeString __fastcall ExpandUNCFileName(const System::UnicodeString FileName);

参数:

  • FileName 文件名/文件夹名,字符串;

返回值:

  • 参数 FileName 字符串前面加上完整的路径的字符串;
  • ExpandUNCFileName 不检查文件是否存在,只是按照当前路径扩展为完整路径;
    • 可以通过 SetCurrentDir 修改当前文件夹位置;
    • 可以通过 GetCurrentDir 获取当前文件夹位置;
  • 支持 UNC (Universal Naming Convention) 格式 (仅 Windows 操作系统),如果驱动器是映射的网络驱动器,会把驱动器 (例如 "D:") 转为 "\\电脑名称\共享名称\"。

相关:

  • System::Sysutils::ExpandFileName
  • System::Sysutils::ExpandFileNameCase
  • System::Sysutils::ExpandUNCFileName
  • System::Sysutils::GetCurrentDir
  • System::Sysutils::SetCurrentDir
  • System::Sysutils::GetHomePath
  • System::Sysutils::ChangeFileExt
  • System::Sysutils::ChangeFilePath
  • System::Sysutils::ExtractFileDir
  • System::Sysutils::ExtractFileDrive
  • System::Sysutils::ExtractFileExt
  • System::Sysutils::ExtractFileName
  • System::Sysutils::ExtractFilePath
  • System::Sysutils::ExtractRelativePath
  • System::Sysutils::ExtractShortPathName
  • System::Sysutils
  • System::Ioutils::TPath
  • System::Ioutils
  • std::_fullpath, std::_tfullpath, std::_wfullpath
  • std::_makepath, std::_tmakepath, std::_wmakepath
  • std::_splitpath, std::_tsplitpath, std::_wsplitpath
  • <cstdlib>

C++ Builder 参考手册System::SysutilsExpandUNCFileName

相关文章

网友评论

      本文标题:ExpandUNCFileName - C++ Builder

      本文链接:https://www.haomeiwen.com/subject/tcmdahtx.html