I would not have to worry about supporting the SMB class of my MLfiles library if the following method calls were added to the SMBfile class:
This would make the question of separating the OS file class and SMB class moot.
Thanks,
--- Jem
B4X:
/**
* True if this file or directory is hidden.
*
*/
public boolean IsHidden() throws SmbException
{
return ((SmbFile)getObject()).isHidden();
}
/**
* Returns the share name
*
*/
public String GetShare() throws SmbException
{
return ((SmbFile)getObject()).getShare();
}
/**
* Returns the Samba server name
*
*/
public String GetServer() throws SmbException
{
return ((SmbFile)getObject()).getServer();
}
public final int TYPE_FILESYSTEM = 0x01;
public final int TYPE_WORKGROUP = 0x02;
public final int TYPE_SERVER = 0x04;
public final int TYPE_SHARE = 0x08;
public final int TYPE_PRINTER = 0x20;
public final int TYPE_NAMED_PIPE = 0x10;
public final int TYPE_COMM = 0x40;
/**
* Returns an Int representing the type of SMB object for this SambaFile from 0 through 6
*
* TYPE_FILESYSTEM, a regular file or directory
* TYPE_WORKGROUP, A workgroup
* TYPE_SERVER, a Samba server
* TYPE_SHARE, a shared directory
* TYPE_PRINTER, a shared printer
* TYPE_NAMED_PIPE, a named pipe
* TYPE_COMM, a communications device
*
*/
public int GetType() throws SmbException
{
return ((SmbFile)getObject()).getType();
}
/**
* Returns the SMB path to this file or directory
*
*/
public String GetPath() throws SmbException
{
return ((SmbFile)getObject()).getPath();
}
This would make the question of separating the OS file class and SMB class moot.
Thanks,
--- Jem