http://qs1969.pair.com?node_id=1014506


in reply to Re^5: Uniquely identifying each & every html template
in thread Uniquely identifying each & every html template

Yes and i dont know if joomla does it too.....

BUT i dont want to embed strings inside every files content.

There must be some other way to identify the file, NOT the following attributes:

1. filename
2. filepath
3. hash
3. embedded string

Really....how's the OS detects each file and its modifications?

Replies are listed 'Best First'.
Re^7: Uniquely identifying each & every html template
by BrowserUk (Patriarch) on Jan 21, 2013 at 19:23 UTC
    how's the OS detects each file and its modifications?

    It doesn't. When you edit a file, with most programs, the edited file is written out to a completely new file (with a temporary name), then the old file is deleted, and the temporary file is renamed to the old filename. The *ONLY* link between them is the name.

    That's life. Stop wishing for the impossible.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      You are right. What i ask cannot be done.

      so, i guess i have to decide if the identifier will be the "filepath" or the "hash" (based on file's contents)

      Which method do you advise me to use?
        Which method do you advise me to use?

        Seems to me that file contents is likely to change far more often than filepath. And applications that edit contents tend to retain the same name for the edited file.

        Plus, even if you copied a file verbatim to a different path, they are no longer the same file as they are likely to be parts of different applications and/or websites. As such, the contents are likely to diverge over time as the separate apps/sites change.

        In short, I'd use the filepath.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.
        Well, what about a version control system? SVN or git can track files as they are moved around, because you do not use the system's mv, but rather the VCS's variant of the same.
        لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ