Patent ID: 8545241

Claim:
A USB flash drive, comprising: a USB connector comprising a body and a first spring, the body comprising a front end and a back end; a latch comprising a base, a sliding cap, a restraining rod, a second spring, and a third spring, the sliding cap defining a restraining groove at an end thereof, the restraining rod comprising a pressing block and two restraining blocks at two opposite ends thereof; and a socket; the back end being rotatably connected to the socket, the first spring being configured for driving the body to rotate from a folded state of the USB flash drive in which the front end is received in the socket to an unfolded state of the USB flash drive in which the front end is out of the socket; the base being connected to the socket at a side of the front end when the USB flash drive is in the folded state, the sliding cap being slidably capped on the base in such a way that the restraining groove is positioned adjacent to the USB connector, the restraining rod being slidably attached to the base in such a way that the pressing block is adjacent to the socket and the restraining block engages with the restraining groove when the USB flash drive is in the unfolded state, the pressing block being configured for bringing the restraining rod to move toward the socket as being pressed by the front end when the USB flash drive changes from the unfolded state to the folded state to disengage the restraining block from the restraining groove, the second spring being configured for driving the sliding cap to slide on the base toward the USB connector and thus latch the USB connector after the restraining block disengages from the restraining groove, the third spring being configured for driving the restraining rod to move towards the sliding cap until the restraining block engages with the restraining groove when the sliding cap is pulled to unlatch the USB connector.