move filesystem abstraction to port.h