| Allegro CL version 8.0 Unrevised from 7.0 to 8.0. | ||||||||||
Arguments: machine
Returns a value that describes the logical filesystems that are currently offered for sharing by one or more computers in the local area network. The form of the returned value depends on the value of the machine argument.
The following describes the two special cases of the machine argument (A and B), followed by the general case (C) where machine is a machine name.
If machine is the keyword
:connected, then a list is returned that contains
one member for each share that is currently connected to the computer
where the call was made, such as:
(("\\\\BEAST\\pc" "Z:")
("\\\\SPOT\\ACL" nil)
("\\\\ROMEO\\smith" nil))
where each member of the list represents a share, and is itself a list consisting of:
nil. When non-nil, this is
always a string.
If machine is the keyword
:all, then a list is returned where there is a
member for each machine that is returned by network-machines, and each of these
members is a list of (1) the UNC machine name (a string) and (2)
either (a) the symbol :access-denied, when that
machine does not allow the current user access to its shares, or else
(b) the list of shares that would be returned if
machine were the machine name, as in case C. This
can take a while to run, since it asks every machine in the network
what its shares are.
Sample returned value:
(("\\\\ADMIN" :access-denied)
("\\\\BEAST"
(("\\\\BEAST\\cdroms" "")
("\\\\BEAST\\support" "Support Directories")
("\\\\BEAST\\home1" "Home Directories")))
...)
Otherwise machine should be the UNC name (a
string) of a machine in the network (including the two backslashes at
the front), such as "\\\\beast"; a list of all such names is returned
by network-machines. In this case, either (1) the symbol
:access-denied is returned, if the machine will not
allow the current user access to its shares, or (2) a list of that
machine's shares is returned, where each share is a list of: (a) the
UNC name of the share, such as "\\\\beast\\pc", and (b) the "comment"
for the share (which is always a string).
Example: The following expression would find an accessible share and return a list of its name and the top-level files in it:
(dolist (machine (network-machines))
(let* ((shares (network-shares (first machine))))
(unless (or (null shares)
(eq shares :access-denied))
(let* ((directory-name (concatenate 'string
(caar shares)
"/")))
(return (list directory-name
(directory directory-name)))))))
This function is defined in the :winapi module. If
that module is not loaded, evaluate (require
:winapi). This function is available on Windows machines
only. In releases prior to 7.0, the symbol naming this function was
in the common-graphics package. Starting in release
7.0, it is in the windows package.
Implementation note: On Windows, this function returns information as provided by the function WNetEnumResource in the Windows Networking (WNet) area of the Windows API.
Copyright (c) 1998-2008, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 8.0. This page was not revised from the 7.0 page.
Created 2005.12.9.
| Allegro CL version 8.0 Unrevised from 7.0 to 8.0. | ||||||||||