public bool ListFolder(string path, DirectoryBrowseMethod cb) { if (m_Remote != null) { if (Running && m_Thread != Thread.CurrentThread) { BeginInvoke((ReplayRenderer r) => { cb(path, m_Remote.ListFolder(path)); }); return(true); } DirectoryFile[] contents = new DirectoryFile[0]; // prevent pings while fetching remote FS data lock (m_Remote) { contents = m_Remote.ListFolder(path); } cb(path, contents); return(true); } return(false); }
public void ListFolder(string path, DirectoryBrowseMethod cb) { if (m_Remote != null) { if (Running && m_Thread != Thread.CurrentThread) { BeginInvoke((ReplayRenderer r) => { cb(path, m_Remote.ListFolder(path)); }); return; } cb(path, m_Remote.ListFolder(path)); } }