[Delphi (Object Pascal)] Delphi根据路径返回驱动器类型 →→→→→进入此内容的聊天室

来自 , 2020-04-04, 写在 Delphi (Object Pascal), 查看 108 次.
URL http://www.code666.cn/view/0b94ce08
  1. function DriveTypeFromPath(const Path: string): Integer;
  2. var
  3.   Drive: string;  // the drive name
  4. begin
  5.   Drive := SysUtils.ExtractFileDrive(Path) + '\';
  6.   Result := Integer(Windows.GetDriveType(PChar(Drive)));
  7. end;
  8. //delphi/2199

回复 "Delphi根据路径返回驱动器类型"

这儿你可以回复上面这条便签

captcha