added new utility function to check if a buffer is in the shared path.