ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/lib/cf.pm
(Generate patch)

Comparing deliantra/server/lib/cf.pm (file contents):
Revision 1.275 by root, Thu Jun 7 19:12:22 2007 UTC vs.
Revision 1.276 by root, Sun Jun 10 04:05:47 2007 UTC

1776 $cf::MAP{$self->path} = $self; 1776 $cf::MAP{$self->path} = $self;
1777 1777
1778 $self->reset; # polite request, might not happen 1778 $self->reset; # polite request, might not happen
1779} 1779}
1780 1780
1781=item $maps = cf::map::tmp_maps
1782
1783Returns an arrayref with all map paths of currently instantiated and saved
1784maps.
1785
1786=cut
1787
1788sub tmp_maps() {
1789 [
1790 map {
1791 utf8::decode $_;
1792 !/\.(?:pst|meta)$/ && /^$PATH_SEP/o
1793 ? normalise $_
1794 : ()
1795 } @{ aio_readdir $TMPDIR or [] }
1796 ]
1797}
1798
1781=item cf::map::unique_maps 1799=item cf::map::unique_maps
1782 1800
1783Returns an arrayref of paths of all shared maps that have 1801Returns an arrayref of paths of all shared maps that have
1784instantiated unique items. May block. 1802instantiated unique items. May block.
1785 1803
1786=cut 1804=cut
1787 1805
1788sub unique_maps() { 1806sub unique_maps() {
1789 my $files = aio_readdir $UNIQUEDIR 1807 [
1790 or return; 1808 map {
1791
1792 my @paths;
1793
1794 for (@$files) {
1795 utf8::decode $_; 1809 utf8::decode $_;
1796 next if /\.pst$/; 1810 !/\.(?:pst|meta)$/ && /^$PATH_SEP/o
1797 next unless /^$PATH_SEP/o; 1811 ? normalise $_
1798 1812 : ()
1799 push @paths, cf::map::normalise $_; 1813 } @{ aio_readdir $UNIQUEDIR or [] }
1800 } 1814 ]
1801
1802 \@paths
1803} 1815}
1804 1816
1805package cf; 1817package cf;
1806 1818
1807=back 1819=back

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines