[jcifs] Re: smb printers with jcifs
Michael B. Allen
miallen at eskimo.com
Sun Jun 16 10:24:35 EST 2002
On Sat, 15 Jun 2002 22:08:25 +0200
Michael Schulze <fry26 at genion.de> wrote:
> On Friday 14 June 2002 23:40, Michael B. Allen wrote:
> > occured. I don't think I want four more isXxx methods but I would happy
> > with one isPrinter. Or we could have some kind of getType method that
> > returns SmbFile.TYPE_DISK, SmbFile.TYPE_PRINTER, SmbFile.TYPE_DEVICE, or
> > SmbFile.TYPE_IPC (in which case we could drop isWorkgroup and add
> > TYPE_WORKGROUP and TYPE_SERVER too).
>
> From my point of view I would favor a getType() method. This way one could
> just have a: switch( file.getType()) { case ... case ... case } instead of a
> if( file.isDir()){ ....} else { if( file.isFile()) { ... }}
Agreed. With this "everything is a node" model I think a getType interface
would be more appropriate.
Mike
--
http://www.eskimo.com/~miallen/c/jus.c
More information about the jcifs
mailing list