Module: XcodeMove

Defined in:
lib/xcmv.rb,
lib/xcmv/file.rb,
lib/xcmv/version.rb,
lib/xcmv/project_cache.rb,
lib/xcmv/header_visibility.rb,
lib/xcmv/group_membership.rb

Defined Under Namespace

Classes: File, Group, GroupMembership, HeaderVisibility, ProjectCache

Constant Summary collapse

VERSION =
'1.3.1'

Class Method Summary collapse

Class Method Details

.mv(src, dst, options) ⇒ Object

Moves from one ‘Pathname` to another



11
12
13
14
15
16
17
18
19
20
# File 'lib/xcmv.rb', line 11

def self.mv(src, dst, options)
  src_file = src.directory? ? Group.new(src) : File.new(src) 
  dst_file = dst.directory? ? src_file.with_dirname(dst) : File.new(dst)

  puts("#{src_file.path} => #{dst_file.path}")

  project_mv(src_file, dst_file, options)
  disk_mv(src_file, dst_file, options)
  save(src_file, dst_file)
end