[Pas2js] ExtractFileName function
warleyalex
warleyalex at yahoo.com.br
Wed Jul 31 23:15:39 CEST 2019
AllowDirectorySeparators := ['\'];
fullFileName : String = 'C:\Program
Files\Borland\Delphi7\Projects\Unit1.dcu';
// Show the component parts of this full name
console.log('Drive = '+ExtractFileDrive (fullFileName));
console.log('Dir = '+ExtractFileDir (fullFileName));
console.log('Path = '+ExtractFilePath (fullFileName));
console.log('Name = '+extractfilename (fullFileName));
console.log('Ext = '+ExtractFileExt (fullFileName));
outputs correctly
===========
Drive = C:
Dir = C:\Program Files\Borland\Delphi7\Projects
Path = C:\Program Files\Borland\Delphi7\Projects\
Name = Unit1.dcu
Ext = .dcu
--
Sent from: http://pas2js.38893.n8.nabble.com/
More information about the Pas2js
mailing list