The powers of the police in Scotland, as with much of Scots law, are based on mixed elements of statute law and common law.