Welcome to Ireland Reaching Out!
I located two sites which provide some background on McSharry and varinat names like McSherry. The first mentions the connection to Foley.
In the mid-19th century McSharry was primarily in Leitrim but there was also a good number in Sligo. The 1901 census had 121 McSharry households in Leitrim and 48 McSharry households in Sligo mainly where Sligo and Leitrim meet near the civil parishes of Rossinver in both counties. You can see the households at my 1901 census site www.leitrim-roscommon.com/1901census