Will updating my MacBook Pro to OSX Yosemite delete/ruin my current files on desktop
It probably won't, but just to be safe, it never hurts to take a backup! Take a Time Machine backup of your hard drive, and then upgrade. Worst-case scenario, you lose your Xcode files, in which case you can just wipe your hard drive and restore from the backup.