Win32::UrlCache::Cache - parse Internet Explorer's Cache index.dat


Win32-UrlCache documentation Contained in the Win32-UrlCache distribution.

Index


Code Index:

NAME

Top

Win32::UrlCache::Cache - parse Internet Explorer's Cache index.dat

SYNOPSIS

Top

  use Win32::UrlCache::Cache;
  my $cache = Win32::UrlCache::Cache->new;

DESCRIPTION

Top

This is just a sugar for Win32::UrlCache to make Win32 users happy. This will look for a path of the main 'index.dat' for IE's cache (Temporary Internet Files).

METHOD

Top

new

searches for a cache directory in the registry, and provides it to the parent Win32::UrlCache.

AUTHOR

Top

Kenichi Ishigaki, <ishigaki at cpan.org>

COPYRIGHT AND LICENSE

Top


Win32-UrlCache documentation Contained in the Win32-UrlCache distribution.

package Win32::UrlCache::Cache;

use strict;
use warnings;
use base qw( Win32::UrlCache );
use Win32::TieRegistry ( Delimiter => '/' );
use File::Spec;

sub new {
  my $class = shift;

  $class->SUPER::new( $class->_file );
}

sub _file {
  my $class = shift;
  my $dir   = $Registry->{'CUser/Software/Microsoft/Windows/CurrentVersion/Explorer/Shell Folders//Cache'};

  my $ie5_dir = File::Spec->catdir( $dir, 'Content.IE5' );
  $dir = $ie5_dir if -d $ie5_dir;

  return File::Spec->catfile( $dir, 'index.dat' );
}

1;

__END__