Aqueduct.Appia.Core.MainModule.IsAllowedFile C# (CSharp) Method

IsAllowedFile() private method

private IsAllowedFile ( string path ) : bool
path string
return bool
        private bool IsAllowedFile(string path)
        {
            if (string.IsNullOrEmpty(path))
                return false;
            string processed = path.Trim('/').ToLower();

            if (processed.StartsWith("bin"))
                return false;

            var extension = System.IO.Path.GetExtension(processed).Trim('.');
            return ForbiddenExtensions.Contains(extension) == false;
        }