Dikanio's avatar

Detect a new file in folder

hi, i was wondering how can i detect if a new file is created, updated in a folder, i'm using laravel 5.5 now. Let's say that third app will upload a file via ftp to my app, how can i detect a presence of that files, so i can process it and move it to another folder

Thanks in advance for any help :)

0 likes
1 reply
bobbybouwmann's avatar
Level 88

The easiest way is probably creating a cronjob or in Laravel terms "Scheduled job" that looks in the folder for new files and processes them.

You can for example run it every 5 minutes and check for changes!

Please or to participate in this conversation.