Similarly, here we can avoid doing unnecessary work twice by retrieving the file type only once and comparing it against relevant operands, avoiding potential unnecessary object construction/destruction.
Similarly, here we can avoid doing unnecessary work twice by retrieving the file type only once and comparing it against relevant operands, avoiding potential unnecessary object construction/destruction.