Skip to main content

move_path

Function move_path 

Source
pub fn move_path(opts: MoveOptions) -> Result<MoveResult>
Expand description

Move/rename a file in the index and on disk.

§Arguments

  • opts - Move options including source and destination paths.

§Behavior

  • Renames file on disk
  • Updates index: removes old path, adds new path with same content hash
  • Equivalent to: rm old + add new (but preserves content hash for rename detection)