Human: Python code to check if directory access is available. Assistant: 
Here is a Python code to check if directory access is allowed

import os

def is_dir(path):
    """Checks if a path is a directory."""
    return os.path.isdir(path)

# Enter the path
path = "/home/rosey/Desktop/test.txt"

# Calling the function
print((is_dir(path)))

#Example Output
# False

#Remember to inspect code for bugs.