Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^7: Uniquely identifying each & every html template

by BrowserUk (Pope)
on Jan 21, 2013 at 19:23 UTC ( #1014508=note: print w/ replies, xml ) Need Help??


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

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.


Comment on Re^7: Uniquely identifying each & every html template
Re^8: Uniquely identifying each & every html template
by Nik on Jan 22, 2013 at 06:32 UTC
    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.
        Thank you for all your help you provided me! Let's just hope i can code this.
      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://1014508]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2014-12-20 08:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls