Flood.Application.SearchForAssetsDirectory C# (CSharp) Method

SearchForAssetsDirectory() private method

private SearchForAssetsDirectory ( string &path ) : bool
path string
return bool
        private bool SearchForAssetsDirectory(out string path)
        {
            var currentDirectory = Directory.GetCurrentDirectory();

            while (true)
            {
                var fullPath = Path.Combine(currentDirectory, AssetsDirectory);

                if (Directory.Exists(fullPath))
                {
                    path = fullPath;
                    return true;
                }

                var parentDirectory = Directory.GetParent(currentDirectory);
                if (parentDirectory == null) break;

                currentDirectory = parentDirectory.FullName;
            }

            path = null;
            return false;
        }