The function does not have an internal state. It is external, otherwise it wouldn't be shared between calls. The state also ensures that every reference to a file is mapped identically.