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.488 by root, Wed Oct 21 00:44:39 2009 UTC vs.
Revision 1.489 by root, Fri Oct 23 03:08:35 2009 UTC

2339 /\.pst$/ || !/^$PATH_SEP/o # TODO unique maps apparebntly lack the .map suffix :/ 2339 /\.pst$/ || !/^$PATH_SEP/o # TODO unique maps apparebntly lack the .map suffix :/
2340 ? () 2340 ? ()
2341 : normalise $_ 2341 : normalise $_
2342 } @{ aio_readdir $UNIQUEDIR or [] } 2342 } @{ aio_readdir $UNIQUEDIR or [] }
2343 ] 2343 ]
2344}
2345
2346=item cf::map::static_maps
2347
2348Returns an arrayref if paths of all static maps (all preinstalled F<.map>
2349file in the shared directory). May block.
2350
2351=cut
2352
2353sub static_maps() {
2354 my @dirs = "";
2355 my @maps;
2356
2357 while (@dirs) {
2358 my $dir = shift @dirs;
2359
2360 my ($dirs, $files) = Coro::AIO::aio_scandir "$MAPDIR$dir", 2
2361 or return;
2362
2363 for (@$files) {
2364 s/\.map$// or next;
2365 utf8::decode $_;
2366 push @maps, "$dir/$_";
2367 }
2368
2369 push @dirs, map "$dir/$_", @$dirs;
2370 }
2371
2372 \@maps
2344} 2373}
2345 2374
2346=back 2375=back
2347 2376
2348=head3 cf::object 2377=head3 cf::object

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines