There are couple of ways you can do this, using clamfs or inotify.
clamfs lets you mount an existing folder through clamav, so that any files accessed are first scanned. So lets say you had a folder called /files contain a virus called eicar.txt. You would mount the /files folder as say /clamav/files using clamfs and then accessing /clamav/files/eicar.txt would give a permission denied (because a virus was detected), whereas /files/eicar.txt would work fine.
inotify is a is a method for the kernel to let applications know about filesystem changes. It isn't clamav related, but what you can do is set up inotify watchers on various folders, and if any file changes are seen (such as adding a new file) it can trigger clamav to scan the file.