Perl Diver 2.31
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

File::HomeDir::Windows

Name File::HomeDir::Windows
Version 1.002
Located at /usr/share/perl5/vendor_perl
File /usr/share/perl5/vendor_perl/File/HomeDir/Windows.pm
Is Core No
Search CPAN for this module File::HomeDir::Windows
Documentation File::HomeDir::Windows
Module Details File::HomeDir::Windows


NAME

File::HomeDir::Windows - Find your home and other directories on Windows


SYNOPSIS

  use File::HomeDir;

  # Find directories for the current user (eg. using Windows XP Professional)
  $home    = File::HomeDir->my_home;        # C:\Documents and Settings\mylogin
  $desktop = File::HomeDir->my_desktop;     # C:\Documents and Settings\mylogin\Desktop
  $docs    = File::HomeDir->my_documents;   # C:\Documents and Settings\mylogin\My Documents
  $music   = File::HomeDir->my_music;       # C:\Documents and Settings\mylogin\My Documents\My Music
  $pics    = File::HomeDir->my_pictures;    # C:\Documents and Settings\mylogin\My Documents\My Pictures
  $videos  = File::HomeDir->my_videos;      # C:\Documents and Settings\mylogin\My Documents\My Video
  $data    = File::HomeDir->my_data;        # C:\Documents and Settings\mylogin\Local Settings\Application Data


DESCRIPTION

This module provides Windows-specific implementations for determining common user directories. In normal usage this module will always be used via the File::HomeDir manpage.

Internally this module will use Win32::GetFolderPath to fetch the location of your directories. As a result of this, in certain unusual situations (usually found inside large organisations) the methods may return UNC paths such as \\cifs.local\home$.

If your application runs on Windows and you want to have it work comprehensively everywhere, you may need to implement your own handling for these paths as they can cause strange behaviour.

For example, stat calls to UNC paths may work but block for several seconds, but opendir() may not be able to read any files (creating the appearance of an existing but empty directory).

To avoid complicating the problem any further, in the rare situation that a UNC path is returned by GetFolderPath the usual -d validation checks will not be done.


SUPPORT

See the support section the main the File::HomeDir manpage module.


AUTHORS

Adam Kennedy <adamk@cpan.org>

Sean M. Burke <sburke@cpan.org>


SEE ALSO

the File::HomeDir manpage, the File::HomeDir::Win32 manpage (legacy)


COPYRIGHT

Copyright 2005 - 2011 Adam Kennedy.

Some parts copyright 2000 Sean M. Burke.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

Perl Diver brought to you by ScriptSolutions.com © 1997- 2024