5

When I don't want something anymore and it says: "Moving to trash," is it actually moving the data, or just updating its path or giving a special "Trashed" label or something?

0

1 Answer 1

4

Technically no. Trash is the combination of several hidden trash folders, one per volume that is mounted. And also filtered by user account so you won’t see trashed items from another account.

Basically, yes since files on macOS (or any 'NIX system) consist of a couple of parts.

The file contents are referenced by an inode which is referenced by 1 or more directory entries.

When a file is deleted or moved to Trash the file contents remain where it is. In the case of move to Trash a new directory entry (under .Trash) is created which references the file. The actual name in the directory entry is a modified version of the original (you can have many files of the same name in Trash).

To simply answer the question, the only thing that changes is the directory tree.

EDIT To address the additional question:-
Moving a file within a partition also (usually) leaves the file contents in place; moving to another location (with its own directory tree) involves a physical move of file contents. (To some extent this is program dependent - programs using the normal API behave this way, but actual behaviour is up to the program.)

1
  • Is it the same for moving files? (As in, I make a new document and then drag it in Finder) (I've scanned our hard drive and gotten a map that shows files being generally grouped together)
    – Zara
    May 9, 2018 at 14:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .