Subversion Repositories DevTools

Rev

Rev 6762 | Rev 6923 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6762 Rev 6766
Line 726... Line 726...
726
        Error("$fname: Prepare failure");
726
        Error("$fname: Prepare failure");
727
    }
727
    }
728
}
728
}
729
 
729
 
730
#-------------------------------------------------------------------------------
730
#-------------------------------------------------------------------------------
-
 
731
# Function        : getFileTime  
-
 
732
#
-
 
733
# Description     : Get the timestamp from a file 
-
 
734
#
-
 
735
# Inputs          : Path to the file
-
 
736
#
-
 
737
# Returns         : Time since the file was created in seconds 
-
 
738
#
-
 
739
 
-
 
740
sub getFileTime
-
 
741
{
-
 
742
    my ($fname, $idx) = @_;
-
 
743
    my $stamp = (stat($fname))[8];
-
 
744
    if (defined $stamp) {
-
 
745
        $stamp = time() - $stamp;
-
 
746
    } else {
-
 
747
        $stamp = 0;
-
 
748
    }
-
 
749
    return $stamp;
-
 
750
}
-
 
751
 
-
 
752
#-------------------------------------------------------------------------------
-
 
753
# Function        : makeFile 
-
 
754
#
-
 
755
# Description     : Create a file
-
 
756
#
-
 
757
# Inputs          : Path to the file 
-
 
758
#
-
 
759
# Returns         : 
-
 
760
#
-
 
761
 
-
 
762
sub makeFile
-
 
763
{
-
 
764
    my ($name) = @_;
-
 
765
    my $fh;
-
 
766
    open( $fh, '>',$name);
-
 
767
    print $fh '';
-
 
768
    close $fh;
-
 
769
}
-
 
770
 
-
 
771
#-------------------------------------------------------------------------------
731
#   Documentation
772
#   Documentation
732
#
773
#
733
 
774
 
734
=pod
775
=pod
735
 
776