Dragging file at the Dock creates a copy of a file?

When I drag and drop a file from Finder to Dock, it creates a copy of the file somewhere? I would like to create some type of link as I know from Windows. Until now I created a link (context menu -> Create a link) and used a this link instead of using original file. What procedure is correct?

You can see that two of these three icons are a links and one is original file.


Dragging a file/folder into the Dock just creates a reference there, it does not duplicate the file/folder. In your case you can omit the "create a link" step.

The reference to said object is stored in the $HOME/Library/Preferences/com.apple.dock.plist file under the persistent-others key as a Dictionary labeled Item N where N is the next available number starting from 0. Among the information stored about the object is its pathname so the object can be opened when its Dock Tile is clicked.

    <key>persistent-others</key>
    <array>
            <dict>
                    <key>GUID</key>
                    <integer>86167247</integer>
                    <key>tile-data</key>
                    <dict>
                            <key>arrangement</key>
                            <integer>2</integer>
                            <key>displayas</key>
                            <integer>1</integer>
                            <key>file-data</key>
                            <dict>
                                    <key>_CFURLAliasData</key>
                                    <data>
                                    AAAAAACkAAMAAQAA0HpGVwAASCsAAAAAABuw
                                    VwAxxNoAANB6bMcAAAAACSD//gAAAAAAAAAA
                                    /////wABAAgAG7BXABsCdgAOABQACQBEAG8A
                                    dwBuAGwAbwBhAGQAcwAPABoADABNAGEAYwBp
                                    AG4AdABvAHMAaAAgAEgARAASABNVc2Vycy9w
                                    c2UvRG93bmxvYWRzAAATAAEvAAAVAAIACv//
                                    AAA=
                                    </data>
                                    <key>_CFURLString</key>
                                    <string>file:///Users/pse/Downloads/</string>
                                    <key>_CFURLStringType</key>
                                    <integer>15</integer>
                            </dict>
                            <key>file-label</key>
                            <string>Downloads</string>
                            <key>file-mod-date</key>
                            <integer>3497684167</integer>
                            <key>file-type</key>
                            <integer>2</integer>
                            <key>parent-mod-date</key>
                            <integer>3497684167</integer>
                            <key>preferreditemsize</key>
                            <integer>-1</integer>
                            <key>showas</key>
                            <integer>1</integer>
                    </dict>
                    <key>tile-type</key>
                    <string>directory-tile</string>
            </dict>
    </array>