文件名是否有效

I

import

Unregistered / Unconfirmed
GUEST, unregistred user!
function IsValidFileName(const FileName: string): boolean; const
InValidChar: array[0..8] of char = ('/', '/', ':', '*', '?', '"', '<', '>', '|');
var
i: integer;
begin
result:=length(FileName) <= MAX_PATH;
if not Result then exit;
for i := low(InValidChar) to high(InValidChar) do
begin
result := pos(InValidChar, FileName) = 0;
if not Result then break;
end;
end;
 

Similar threads

S
回复
0
查看
603
SUNSTONE的Delphi笔记
S
S
回复
0
查看
604
SUNSTONE的Delphi笔记
S
I
回复
0
查看
646
import
I
I
回复
0
查看
512
import
I
顶部