Basic Answer: Yes.

I have a system where a cfm file creates other cfm files just fine.  I see no 
reason why a file in memory could not re-write the disk version of the file.

Not sure about how that would affect the compiled version of the file.  But I 
presume if the admin setting to always check for new versions is on then it 
will be recompiled the next time the cfm file is requested.

--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
 
"C code. C code run. Run code run. Please!"
- Cynthia Dunning

....-----Original Message-----
....From: Mike Soultanian [mailto:[EMAIL PROTECTED]
....Sent: Wednesday, August 03, 2005 1:54 PM
....To: CF-Talk
....Subject: Can a CF file edit itself?
....
....I am trying to create a file security system and I have a custom tag
....that checks the security settings on a CFM file every time it is
....accessed.  So, at the top of the page would be:
....
....<CF_SECURITYCHECK>
....
....This tag checks the database to see if the logged-in user has access to
....the file and continues loading the page if the user does.  If the user
....doesn't have access, the user will be sent to an error page.  Obviously,
....to keep track of every file on the system the database needs to have a
....unique identifier for each file.  I could use the directory/filename,
....but if move a file, that would cause problems because the database would
...."lose" the information on that file and permissions would have to be
....reset (pain).
....
....So, what I want to happen is when a CFM page is accessed for the first
....time, I want it to edit itself and put in a a unique file identifier
....that it will then be stored in the database.  So, for example, it will
....take the following:
....
....<CF_SECURITYCHECK>
....
....and change it to:
....
....<CF_SECURITYCHECK FileID="[some randomly generated unique number]">
....
....I know this may not be possible, but I thought I'd check anyways.
....Otherwise, does anyone know how I can identify a file by some unique
....characteristic (i.e. checksum maybe)?  It's kinda similar to an NTFS
....system where the system knows the permissions on a file regardless of
....where it moves to.
....
....What I would like to avoid is generating my own unique numbers in each
....file.  I could do it that way, but I'd like to find a clean and more
....automatic way to take care of it.
....
....Thanks,
....Mike
....
....

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:213658
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to