www.icetips.com  Icetips Utilities Documentation 11/30/2010    

Network Class:  IsLocalShare

Previous  Top  Next  


Prototype: (String pPath), Byte

 

pPathUNC path

 

ReturnsReturns True if the path is part of a local share, false if it is not.

 

This method first checks if the pPath is a UNC.  This is done by simply checking if the first two characters are '\\'  Then local shares are enumerated and each one is searched for the pPath.  If a local share is found that matches part of the pPath UNC path, then it is considered to be a match.  pPath can include a filename, for example "\\comp\C_Drive\Clarion\Apps\MyProgram\MyProgram.app".  If a local share is found that contains "\\comp\C_Drive\Clarion" then IsLocalShare will return True. 

Note that it does not care how many local shares may be pointing to the path, for example there could be one pointing to "\\comp\C_Drive", one to "\\comp\C_Drive\Clarion" and one to "\\comp\C_Drive\Clarion\Apps" and IsLocalShare will simply determine up on first find that the path is part of a local share and return true.

 

Example:

ITN  ITNetworkClass

Code

If ITN.IsLocalShare('\\comp\C_drive\Clarion\Apps\MyProgram\MyProgram.app')

  Message('This file is on a local share')

End

 

See also:

ConvertToUNC

GetLocalNetworkFileName

GetUNCFileName

EnumLocalShares

 

 

 



Direct link to this page: http://www.icetips.com/manuals/utilities/islocalshare_network.htm