What would be the most efficient way to check if a file, or list of files are in use by another process?

Thanks