What is a file?
It's more than just a path, you can have a well formed path that refers to a non-existant file.
It's not just a sequence of bytes on a storage medium, it also involves other metadata - such as a path, modification timestamp, etc.
Then we have "files" under procfs on linux systems, and named pipes, and network streams - all accessible fia "file handles". There are different and deeply interwoven concepts that are all known as "file" in different contexts. Some of these can be immutable.
First, there's the path. This is completely immutable. Paths can have many operations, you can get the parent path, find the path of the some subdirectory(as a new immutable path instance), etc. Path needn't have an operation to determine if it's well-formed, as this can be done at construction time.