Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^6: Uniquely identifying each & every html template

by Nik
on Jan 21, 2013 at 18:14 UTC ( #1014506=note: print w/ replies, xml ) Need Help??


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?


Comment on Re^6: Uniquely identifying each & every html template
Re^7: Uniquely identifying each & every html template
by BrowserUk (Pope) 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.
        لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1014506]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2014-07-28 11:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (196 votes), past polls