Microsoft Azure File DataLake Storage Client Library for Python
Overall
score
92%
Build a file permission manager that manages access control for files and directories in Azure Data Lake Storage Gen2 using standard Unix-style permissions.
@generates
class PermissionManager:
"""Manages POSIX permissions for Azure Data Lake Storage Gen2 files and directories."""
def __init__(self, file_system_client):
"""Initialize with a file system client.
Args:
file_system_client: An Azure FileSystemClient instance
"""
pass
def create_directory_with_permissions(self, directory_path: str, permissions: str) -> None:
"""Create a directory with specified POSIX permissions.
Args:
directory_path: Path where the directory should be created
permissions: POSIX permissions in symbolic (e.g., 'rwxr-xr--') or octal (e.g., '0754') notation
"""
pass
def create_file_with_permissions(self, file_path: str, permissions: str) -> None:
"""Create a file with specified POSIX permissions.
Args:
file_path: Path where the file should be created
permissions: POSIX permissions in octal notation (e.g., '0644')
"""
pass
def update_permissions(self, path: str, permissions: str) -> None:
"""Update permissions for an existing file or directory.
Args:
path: Path to the file or directory
permissions: POSIX permissions in octal notation (e.g., '0755')
"""
pass
def get_permissions(self, path: str) -> str:
"""Get the current permissions of a file or directory.
Args:
path: Path to the file or directory
Returns:
String representation of the permissions
"""
passProvides Azure Data Lake Storage Gen2 client library for managing files, directories, and their POSIX permissions.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/pypi-azure-storage-file-datalakedocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10