[#2357] add stat operation, also mkdir_r for synctoarch