public static async Task <Item[]> EnumItemsAsync(Guid itemId, bool includeFolders, bool includeItems)
        {
            if (includeFolders && includeItems)
            {
                return(await WebFolderApi.GetChildrenAsync(itemId));
            }

            if (includeFolders)
            {
                return(await WebFolderApi.GetFoldersAsync(itemId));
            }

            return(await WebFolderApi.GetItemsAsync(itemId));
        }
Пример #2
0
        private async Task PingServer()
        {
            // get root
            try
            {
                var item = await WebFolderApi.GetItemAsync(Guid.Empty);

                if (item != null)
                {
                    AppendText("Server at " + WebFolderApi.ApiBaseUrl + " was successfully pinged.");
                }
            }
            catch (Exception e)
            {
                AppendText("Server at " + WebFolderApi.ApiBaseUrl + " can't be pinged (Error: '" + e.Message + "'). Please make sure the WebFolderSite web site is started.");
            }
        }