FileAttributesFactory: simplify the code a lot