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.276 by root, Sun Jun 10 04:05:47 2007 UTC vs.
Revision 1.277 by root, Sun Jun 10 04:24:50 2007 UTC

1779} 1779}
1780 1780
1781=item $maps = cf::map::tmp_maps 1781=item $maps = cf::map::tmp_maps
1782 1782
1783Returns an arrayref with all map paths of currently instantiated and saved 1783Returns an arrayref with all map paths of currently instantiated and saved
1784maps. 1784maps. May block.
1785 1785
1786=cut 1786=cut
1787 1787
1788sub tmp_maps() { 1788sub tmp_maps() {
1789 [ 1789 [
1790 map { 1790 map {
1791 utf8::decode $_; 1791 utf8::decode $_;
1792 !/\.(?:pst|meta)$/ && /^$PATH_SEP/o 1792 /\.map$/
1793 ? normalise $_ 1793 ? normalise $_
1794 : () 1794 : ()
1795 } @{ aio_readdir $TMPDIR or [] } 1795 } @{ aio_readdir $TMPDIR or [] }
1796 ] 1796 ]
1797} 1797}
1798 1798
1799=item $maps = cf::map::random_maps
1800
1801Returns an arrayref with all map paths of currently instantiated and saved
1802random maps. May block.
1803
1804=cut
1805
1806sub random_maps() {
1807 [
1808 map {
1809 utf8::decode $_;
1810 /\.map$/
1811 ? normalise "?random/$_"
1812 : ()
1813 } @{ aio_readdir $RANDOMDIR or [] }
1814 ]
1815}
1816
1799=item cf::map::unique_maps 1817=item cf::map::unique_maps
1800 1818
1801Returns an arrayref of paths of all shared maps that have 1819Returns an arrayref of paths of all shared maps that have
1802instantiated unique items. May block. 1820instantiated unique items. May block.
1803 1821
1805 1823
1806sub unique_maps() { 1824sub unique_maps() {
1807 [ 1825 [
1808 map { 1826 map {
1809 utf8::decode $_; 1827 utf8::decode $_;
1810 !/\.(?:pst|meta)$/ && /^$PATH_SEP/o 1828 /\.map$/
1811 ? normalise $_ 1829 ? normalise $_
1812 : () 1830 : ()
1813 } @{ aio_readdir $UNIQUEDIR or [] } 1831 } @{ aio_readdir $UNIQUEDIR or [] }
1814 ] 1832 ]
1815} 1833}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines