It would be simple to get the md5 from, beam_lib:md5(Beam)
http://erlang.org/doc/man/beam_lib.html

But header files would still require file datetime checking, with the
possibility of having a link.

file:read_link(Name)
provides a simple way of checking for a link, if necessary. (it isn't
entirely clear from the documentation, but the Filename returned is really
the path of the real file in the way the link references it).

On Mon, Jul 27, 2009 at 2:44 PM, Samuel <[email protected]> wrote:

>
> I believe that you must follow the link explicitly (I.e. Open the target
> file)
>
> As a side note, I like how scons traces the dependencies of the build
> targets, it stores a MD5 of the files, instead of relying on the file
> dates. Just in case someone is thinking of making changes there :)
>
> 2009/7/27, Michael Truog <[email protected]>:
> > Ok, I know it is an odd case.  It would be helpful for me, but is not a
> > major issue.  I haven't looked at how to get at the referenced file time
> at
> > the erlang layer... I am not sure if the interface already exists.
> >
> > On Mon, Jul 27, 2009 at 1:53 PM, Eric Merritt <[email protected]>
> wrote:
> >
> >>
> >> That's exactly right. Sinan doesn't try to follow links at the moment.
> >> It just uses the modification time filelib gives it.
> >>
> >> On 7/27/09, Martin Logan <[email protected]> wrote:
> >> >
> >> > hmm, interesting, I am guessing sinan uses the file module to read
> >> > file info. Eric any comments on that.
> >> >
> >> > On Fri, Jul 24, 2009 at 10:39 PM, Michael Truog<[email protected]>
> >> wrote:
> >> >>
> >> >> If Sinan tries to compile an Erlang source file in the src directory
> of
> >> >> an application that is a symbolic link, it must be taking the
> >> >> modification time of the symbolic link and not the file behind it.
> >> >> Sinan refuses to recompile the source code until you kill the Sinan
> >> >> server and have it restart.
> >> >>
> >> >> - Michael
> >> >>
> >> >> >
> >> >>
> >> >
> >> > >
> >> >
> >>
> >> --
> >> Sent from my mobile device
> >>
> >> >
> >>
> >
> > >
> >
>
>
> --
> Samuel
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"erlware-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/erlware-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to