![]() |
Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming! |
⤷ Detect changings of a directory
Use FindFirstChangeNotification function for detecting of changing (creating/removing) directory.
procedure TForm1.Timer1Timer(Sender: TObject);
var
Dir: string;
begin
Dir:=Edit1.Text;
if FindFirstChangeNotification(
PChar(Dir),
False,
FILE_NOTIFY_CHANGE_DIR_NAME)<>INVALID_HANDLE_VALUE then
Label1.Caption:=Dir+' directory presents'
else
Label1.Caption:=Dir+' directory absents';
end;
- Related components
- TFileSearch
- TFolderMonitor
- TFileVersion
-
More for developers