I'd like to know how GPS can determine if a street is one-way. Does it detect one-way signs or parked car positions if any?
No. A GPS itself only detects the geographic location of the receiver. Assuming that you're referring to GPS units for cars (e.g., TomTom), the unit cross references the location with an existing database of road names and attributes.