View Full Version : توضیح یه تابع
yashar666
سه شنبه 22 خرداد 1386, 01:29 صبح
با سلام
این تابع کارش چیه
( )ExtractFileDir
someCoder
سه شنبه 22 خرداد 1386, 01:45 صبح
من دلفی بلد نیستم، ولی گوگل (http://www.google.com/search?q=ExtractFileDir)بلدم!
توضیح:
The ExtractFileDir function extracts from FullFileName the directory substring.
This is the part of the full file name up to but not including the final \ before the file name.
مثال:
var
fullFileName : string;
begin
// Set up a full file name with drive and path
fullFileName := 'C:\Program Files\Borland\Delphi7\Projects\Unit1.dcu';
// Show the component parts of this full name
ShowMessage('Drive = '+ExtractFileDrive (fullFileName));
ShowMessage('Dir = '+ExtractFileDir (fullFileName));
ShowMessage('Path = '+ExtractFilePath (fullFileName));
ShowMessage('Name = '+ExtractFileName (fullFileName));
ShowMessage('Ext = '+ExtractFileExt (fullFileName));
end;
خروجی مثال:
Drive = C:
Dir = C:\Program Files\Borland\Delphi7\Projects
Path = C:\Program Files\Borland\Delphi7\Projects\
Name = Unit1.dcu
Ext = .dcu
vBulletin® v4.2.5, Copyright ©2000-1403, Jelsoft Enterprises Ltd.