The link function atomically creates a new link for the existing file, and the link count of the file is incremented by one. The link function can be used on directory files. If link fails, no link is created and the link count of the file remains unchanged.