or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/azure-storage-file-datalake@12.21.x
tile.json

tessl/pypi-azure-storage-file-datalake

tessl install tessl/pypi-azure-storage-file-datalake@12.21.0

Microsoft Azure File DataLake Storage Client Library for Python

Agent Success

Agent success rate when using this tile

92%

Improvement

Agent success rate improvement when using this tile compared to baseline

0.99x

Baseline

Agent success rate without this tile

93%

task.mdevals/scenario-6/

Data Lake File Property Inspector

Build a tool that retrieves and reports properties of files and directories in Azure Data Lake Storage Gen2.

Requirements

Your solution must:

  1. Connect to an Azure Data Lake Storage account and access a specified file system
  2. Retrieve detailed properties for a given file path, including:
    • File size and last modified timestamp
    • Content type and other HTTP headers
    • Metadata key-value pairs
    • POSIX permissions and access control information
  3. Retrieve properties for a directory path, including:
    • Creation and last modified times
    • Metadata
    • Owner and group information
  4. Handle both files and directories correctly based on the path type
  5. Format and display the retrieved properties in a human-readable way

Input

Your program should accept:

  • Connection information (connection string or account credentials)
  • File system name
  • Path to inspect (file or directory)

Output

Display the properties in a structured format showing:

  • Path type (file or directory)
  • All available properties retrieved from the storage service
  • Clear labels for each property

Constraints

  • Use proper error handling for missing paths or connection failures
  • Support both file and directory path types
  • Retrieve comprehensive property information available from the service

Dependencies { .dependencies }

azure-storage-file-datalake { .dependency }

Provides Azure Data Lake Storage Gen2 client library for file system operations and property management.

Test Cases

Test Case 1: Retrieve File Properties { .test }

File: test_file_properties.py { .test-file }

Test: Given a valid file path in a file system, retrieve and verify that file properties include size, last modified time, content type, and metadata. { .test-case }

Test Case 2: Retrieve Directory Properties { .test }

File: test_file_properties.py { .test-file }

Test: Given a valid directory path in a file system, retrieve and verify that directory properties include creation time, owner information, and metadata. { .test-case }

Test Case 3: Handle Non-Existent Path { .test }

File: test_file_properties.py { .test-file }

Test: When requesting properties for a non-existent path, the program should handle the error gracefully and provide a clear error message. { .test-case }