A flash driver, interposed between a file system and a flash memory medium (100/200; 100; 200) selected from one of a plurality of different flash memory media, comprising: a flash abstraction logic for managing a set of operating characteristics that are common to a plurality of different flash memory media, said set of operating characteristics comprising managing wear-leveling operations associated with the flash memory medium, maintaining data integrity of the flash memory medium, and handling recovery of data associated with the flash memory medium (100/200; 100; 200) after a power failure, said flash abstraction logic comprising: a sector manager adapted to maintain a write pointer which indicates a next available free sector to receive data on the flash memory medium; a logical-to-physical sector mapping module adapted to manage data as it goes from a file system domain of logical sector addressing to a flash memory medium domain of physical sector addressing; and a compactor adapted for clearing blocks of data on the flash memory medium; and a user-programmable flash medium logic for performing physical sector operations to the flash memory medium, said physical sector operations comprising read, write and erase data operations to and from the flash memory medium, said user-programmable flash medium logic comprising: programmable entry point module adapted to define a set of programming interfaces to communicate between the flash abstraction logic and the flash memory medium (100/200; 100; 200), wherein programmable entry points permit said user to program the user-programmable flash medium logic to interface with the type of the flash memory medium selected from said plurality of different flash memory media; an input/output module adapted for performing said read, write and erase operations; and an error correction code, ECC, module adapted to perform error code correction in accordance with a user-selected ECC algorithm. a flash abstraction logic for managing a set of operating characteristics that are common to a plurality of different flash memory media, said set of operating characteristics comprising managing wear-leveling operations associated with the flash memory medium, maintaining data integrity of the flash memory medium, and handling recovery of data associated with the flash memory medium (100/200; 100; 200) after a power failure, said flash abstraction logic comprising: a sector manager adapted to maintain a write pointer which indicates a next available free sector to receive data on the flash memory medium; a logical-to-physical sector mapping module adapted to manage data as it goes from a file system domain of logical sector addressing to a flash memory medium domain of physical sector addressing; and a compactor adapted for clearing blocks of data on the flash memory medium; and a sector manager adapted to maintain a write pointer which indicates a next available free sector to receive data on the flash memory medium; a logical-to-physical sector mapping module adapted to manage data as it goes from a file system domain of logical sector addressing to a flash memory medium domain of physical sector addressing; and a compactor adapted for clearing blocks of data on the flash memory medium; and a user-programmable flash medium logic for performing physical sector operations to the flash memory medium, said physical sector operations comprising read, write and erase data operations to and from the flash memory medium, said user-programmable flash medium logic comprising: programmable entry point module adapted to define a set of programming interfaces to communicate between the flash abstraction logic and the flash memory medium (100/200; 100; 200), wherein programmable entry points permit said user to program the user-programmable flash medium logic to interface with the type of the flash memory medium selected from said plurality of different flash memory media; an input/output module adapted for performing said read, write and erase operations; and an error correction code, ECC, module adapted to perform error code correction in accordance with a user-selected ECC algorithm. programmable entry point module adapted to define a set of programming interfaces to communicate between the flash abstraction logic and the flash memory medium (100/200; 100; 200), wherein programmable entry points permit said user to program the user-programmable flash medium logic to interface with the type of the flash memory medium selected from said plurality of different flash memory media; an input/output module adapted for performing said read, write and erase operations; and an error correction code, ECC, module adapted to perform error code correction in accordance with a user-selected ECC algorithm.