readFileSystem/README.md

79 lines
2.0 KiB
Markdown
Raw Normal View History

# File System Browser
A Python application using PySide6 to browse and display files and folders from a specified directory (default: C://OEM).
## Features
- Display all files and folders in a table format
- Shows file name, type, size, and last modified date
- Folders are highlighted in blue
- Refresh button to reload the directory
- Handles permission errors gracefully
## Project Structure
```
readFileSystem/
├── src/
│ ├── __init__.py
│ ├── main.py # Main PySide6 application
│ └── file_system.py # File system reading module
├── run.py # Entry point
├── requirements.txt # Python dependencies
└── README.md # This file
```
## Installation
1. Create a virtual environment (optional but recommended):
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
2. Install dependencies:
```bash
pip install -r requirements.txt
```
## Usage
Run the application:
```bash
python run.py
```
### Modifying the Target Directory
To browse a different directory, edit the `target_path` parameter in `src/main.py`:
```python
window = FileSystemBrowser(target_path="C://Your/Path/Here")
```
## Components
### FileSystemReader (src/file_system.py)
- Reads files and folders from a specified path
- Provides file information (name, size, type, modified time)
- Handles permission errors gracefully
- Converts file sizes to human-readable format (B, KB, MB, GB)
### FileSystemBrowser (src/main.py)
- Main GUI window using PySide6
- Displays files in a table widget
- Shows file details: name, type, size, modified date
- Refresh functionality to reload the directory
## System Requirements
- Python 3.8+
- PySide6 6.7.1+
## Notes
- Folders are displayed in blue text for easy identification
- Folders appear first in the list, sorted alphabetically
- Files that cannot be read due to permissions are skipped
- The application works on Windows, macOS, and Linux