If f2 and f7 are the weakest squares on the board, if the f-file the weakest file on the board? For example, other than attacking f2 and f7, is there a theoretical advantage in dominating the f-file?
The f2/f7 squares lose some significance after castling has occurred. The square is no longer protected by just the king - the rook now also protects it. But a f2/f7 pawn with a king on g1/g8 might be pinned by a bishop, which sometimes results in tactical opportunities.
Generally, you should attempt to control the center of the board. The f-file is not the center, but it is adjacent to the center. It might make sense to try to control the f-file if it is open or half-open (or if you plan to make it that way) but that's true of any open file.
If the file is not open or half-open, then it probably makes more sense to look at the individual squares rather than the file as a whole. If White has a pawn on e4, that pawn controls f5, but it also means that pawn can never control f4 (so f4 might be weak.)
I have heard that a million times, but in practice, unless you are really careless with your development, and your king gets stuck in the center, they rarely play a role right out of the opening. Later in the game, I have seen many games where f7 gets pounded on, and if you already happen to have the open f-file (f2 can also fall under attack, but it is less common), that is nice, but in a real game, it is usually a B on the a2-g8 diagonal with a rook or two on the 7th, and any other supporting pieces.
You have to also realize that only a few select openings really aim at f7. You can rule out all but a few k-pawn openings, in most cases.
In short, develop normally, and IF you see the opportunity to pressure f7/f2 naturally, and it makes sense, then go for it. I would not develop artificially trying to strive to make something out of that just because f2/f7 have been called the weakest squares.
There is no weakest file that I can see.
No such thing as a "weak file".
Different pieces move in different ways. Open files do allow rooks to come into the game however. So, in that sense, a weak file would be whatever is open and can be dominated by heavy pieces.