1. Home
  2. Computing & Technology
  3. Delphi Programming
Glossary|Tips/Tricks|FREE App/VCL|Best'O'Net|Books|Link Back

Delphi Programming RTL Reference|By Category|Alphabetically|By Unit
 

FileExists

unit
Sysutils
category
file management routines

declaration
function FileExists(const sFileName: string): boolean;

description
Checks whether a specified file exists.

FileExists returns True if the file specified by sFileName exists, False otherwise.

example
var mp3File : string;

mp3File := 'c:\My Doucuments\mp3\my_song.mp3'

if not FileExists(mp3File) then begin
 ShowMessage('MP3 file ' +#13#10 +
              mp3File + #13#10 + 'does not exist!');
 exit;
end;

in real code
Your first MP3 Delphi player
See how to build a full-blown mp3 player with Delphi in just a few seconds. Even more: get the ID3 tag information from a mp3 file and change it!

see also


 Free Delphi code snippet inside every Delphi Newsletter!
Subscribe to the Newsletter
Name
Email

 Got some code to share? Got a question? Need some help?
Explore Delphi Programming
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming

©2009 About.com, a part of The New York Times Company.

All rights reserved.