Releases: hbisneto/FileSystemPro
FileSystemPro 3.0.0.0
FileSystemPro 3.0.0.0 represents a comprehensive evolution of the library, fusing enhanced file and directory manipulation with advanced monitoring, compression unification, and a pioneering Device suite for hardware telemetry—all while introducing fluent console styling, dynamic configuration, and metadata-rich utilities. This release amplifies cross-platform resilience with timestamp precision, batch integrity checks, event-driven watching, and optional psutil diagnostics, empowering developers to craft scalable automations, CLI masterpieces, and resource-savvy applications. Layered configs, async updates, and backward-compatible APIs ensure seamless upgrades, delivering a lightweight yet potent toolkit under MIT terms for unrestricted deployment on Windows, macOS, and Linux.
Console
-
Revolutionary
Consoleclass enables chainable formatting:console.red().underline().light_green_bg()("Alert!")applies colors (standard/light foregrounds/backgrounds likeblack(),light_blue_bg()), styles (bright(),dim()), and new effects (underline(),strikethrough()) with auto-reset on invocation to eliminate bleed. -
Global
consolesingleton for zero-boilerplate use, alongside explicit resets (reset_underline(),reset_strikethrough()) for granular control in complex outputs. -
ANSI expansions in
ansi.pyadd codes for underlines (4) and strikethroughs (9, resets 24/29); Win32 tweaks inwinterm.pyleverageCOMMON_LVB_UNDERSCORE/STRIKEOUTfor legacy console fidelity. -
Stream wrapping (
init()withautoreset) now handles extended styles efficiently, with optimizations to curb flicker in high-throughput logging.
Core Configuration & Updates
-
Multi-tier config orchestration: Defaults merge with .env (CWD/home, JSON toggles), env vars, and
config.jsonviaload_config();save_config()persists runtime mods like cache limits instantly. -
Logging overhaul: Auto-init on import with levels (DEBUG/INFO/WARNING/ERROR) via
set_logging_level(), supplanting prints for traceable production flows. -
Performance knobs:
set_performance_cache_size(1024)tunes memory for ops;get_config()yields immutable copies for safe reads. -
Toggle system:
toggle_feature('experimental_features')flips nested flags, expandable via .env for low-risk testing. -
Async updater:
check_updates_async()threads GitHub queries with callbacks, digit-based version diffs, and console alerts (e.g., blue notices, green tags); configurableupdate_checker_enabledwith timeouts/logs.
File
-
I/O suite: Text/binary
append()/read()/write()with lines/all-at-once modes, encoding/buffers; newappend_all_bytes(),write_all_bytes()/text(),read_all_bytes()/text()for bulk streams. -
Integrity arsenal:
calculate_checksum()/check_integrity()batch tobatch_check_integrity()dirs (logs/results dicts);find_duplicates()hashes paths,generate_integrity_report()JSON-exports summaries; SHA-256 save/load utils. -
Metadata extractors:
get_extension(),get_filename(),get_size()(raw/formatted "1.5 MB"), mode perms; recursiveenumerate_files()yields sizes/timestamps,list()arrays paths. -
CRUD depth:
copy()/move()singles/lists with overwrites/metadata preserve;rename()/delete()pre-checks/logs booleans; symlink creation,exists()symlink-aware. -
Timestamps: Local/UTC
get/set_creation/access/last_write_time()(datetime/str "YYYY-MM-DD HH:MM:SS"); auto-conversions,utime()Unix fallbacks, access-time neutral writes. -
Splitting:
split_file()/reassemble_file()chunk-configurable (1 MB default), auto-deletes parts; recursive batch scans with progress.
Directory
-
Path builders:
combine()/join()multi-segments with absolute validation/separators; extractorsget_parent()/name(),resolve()dereferences symlinks. -
Lifecycle: Recursive
create()metadata-returns;create_temp_subdirectory()auto-clean;create_symbolic_link();delete()recursive/prompted logs. -
Scans: Glob
get_files/directories/entries()("TopDirectoryOnly"/"AllDirectories"), iterators;list()extensible metadata. -
Checks: Dir-specific
exists(); recursiveget_size()(bytes/"2.5 GB") with progress. -
Timestamps: Full
get/set_*_time()local/UTC (datetime/str), timezone-aware,utime()approximations, error-raised formats/perms. -
Relocation:
move()move_root/overwrite/content modes, metadata returns;rename()checks/booleans, shutil cross-device. -
Viz & context:
get_tree()strings (├──, ignores .git/pycache/node_modules); globalcurrent_directoryget/set()auto-tracks.
Watcher
-
Watchermulti-root initialization withmax_depth, filters (ignore_patterns=['.git'],file_extensions=['.py']);poll()threads delays. -
Events:
register_handler('updated', fn)for 'created/updated/removed'/'all', Queue-pushed async. -
Detection: Filtered
os.walk()diffs mod times/sizes, timestamped;change_history(history_size) enablesget_stats()counts. -
Standalone:
get_changes()notifiers/logs, extensible sans class. -
Queue robustness:
Emptysafe-polls, no-lost changes; filtered walks/pruning for performance.
Wrapper
-
get_object()dicts: Absolute paths, formatted timestamps ("YYYY/MM/DD HH:MM:SS:ff" access/created/modified), flags (exists/is_dir/file/link), names/exts, recursive sizes. -
Auto file/dir handling, exceptions (FileNotFound/Permission); single-pass I/O min.
-
has_extension()string booleans, edge-documented (dotfiles/no-ext). -
Helpers: os.stat/utime cross-operating system, raw-to-string timestamps (no -1 placeholders).
-
Size progression: Formatted from bytes to TB ("1.2 KB"), walk-recursive directories.
Compression
-
Tar:
create_tar()lists/paths,compression='gz'/'bz2'/nonerecursive rel-paths;extract_tar()full/list prefix-matches, implicit destination/metadata. -
Tar read:
read_tar()"r:*" auto-detect lists. -
Zip:
create_zip()multi/arcname hierarchies, metadata returns;extract_zip()granular/full/single, KeyError miss/Runtime corrupt. -
Zip read:
read_zip()system-filter (show_compression_system_files=Falsehides __MACOSX/.DS_Store/Thumbs.db). -
Errors: Raise FileNotFound/Permission/KeyError/Runtime over strings; Wrapper yields post-operations.
-
Single-mod merge: No submods, legacy aliases; prefix-match/filter tweaks, tar/zip parity.
Device
-
Hub:
deviceimportscpu/disks/memory/network; lazy psutil,device.cpu.cpu_percent()hierarchical. -
CPU:
cpu_percent()floats (percpu),cpu_times()states (user/idle/etc.),cpu_count()logical/physical. -
Disks:
get_disk_partitions()tuples/filters (fstype/device/etc.);storage_metrics()5-tuples,disk_info()indexed dicts;disk_io_counters()I/O namedtuples; bootboot_time()str,get_boot_drive_name()labels,get_filesystem_type()root. -
Memory:
virtual_memory()full (total/used/active/etc. bytes), getters (percent_virtual_memory());swap_memory()(used/sin/sout), dedicated functions. -
Network: WiFi/Ethernet
get_wifi_interface/ip/mac/speed_mbps/sent/recv_bytes; totalsget_total_sent_received_bytes();get_active_tcp_connections()PID/IP:port lists;get_all_interfaces()NIC (Network Interface Card) dictionaries (IP/MAC/up/speed/bytes). -
Guards:
__require_psutil__()ImportError on-call; fallbacks (unsupported OS), no-privilege low-latency.
This release also includes other features and improvements:
-
Docstring renaissance: Params/returns/raises/examples per-function, module overviews/imports/snippets/.env templates for onboarding.
-
Platform harmony: Pathlib timestamp conversions, Win32 extends, logging/Core ties, no-elevated permissions.
-
Optimizations: Buffered/lazy (reads/enum/queues/pruning), thread-safe async, JSON reports; backward signatures/overloads.
-
Updates: Auto-import triggers, GitHub timeouts/callbacks/colors; consolidated modules (Compression/Watcher), all exports.
-
Version 3.0.0.0 uniform, major evolutions (chaining/metadata/batching/Device) with compatibility; MIT free, optional psutil.
Some features need permissions (writes/I/O) or vary by OS/FS (timestamps on FAT, swap macOS, fields virtualized environments).
FileSystem Pro 2.1.0.0
This update introduces enhanced cross-platform console styling with support for underline and strikethrough, a new asynchronous update checker in the core module, expanded compression capabilities with metadata returns and format options, and improved robustness in directory and file operations through better error handling and conflict resolution. This release also includes other features, bug fixes, and performance enhancements for more reliable file system management across Linux, macOS, and Windows.
Console
New Features
- Added support for underline and strikethrough styles in ANSI escape codes (UNDERLINE=4, STRIKETHROUGH=9) and Win32 attributes (UNDERSCORE=0x4000, STRIKEOUT=0x8000).
- Introduced the
Consoleclass for chained, intuitive text styling (e.g.,console.red().underline("Warning")), with convenience methods likelight_green(),red_bg(), and automatic reset on invocation. - Version updated to 3.0.0.0, reflecting expanded style options and API improvements.
Improvements
- Enhanced
WinTermclass to track and apply underline/strikethrough flags independently, preventing conflicts with existing bright/light color emulation. - Extended
AnsiStylewith reset codes (RESET_UNDERLINE=24, RESET_STRIKETHROUGH=29) for precise style management. - Improved OSC handling in
AnsiToWin32for better title setting and cursor operations on Windows.
Core
New Features
- Added the
__core__module for centralized configuration and update management. - Implemented asynchronous update checking (
check_updates_async) using GitHub API and threading, with daemon threads to avoid blocking; supports callbacks for notifications. - Auto-runs async update checks on import, comparing versions via digit extraction (e.g., notifies on new releases with pip upgrade prompt).
Compression
New Features
create_tarnow supports compression modes ('gz', 'bz2') for flexible TAR variants (.tar.gz, .tar.bz2).- Extraction functions (
extract_tar,extract_zip) return metadata dictionaries viawrapper.get_object(destination)for post-operation insights. read_taradded for listing TAR contents, mirroring ZIP functionality.
Improvements
- Full implementation of all functions with comprehensive try-except blocks for specific exceptions (e.g., KeyError for missing files, RuntimeError for extraction failures).
- Enhanced
extract_zipflexibility: Supports None (all items), lists, or single strings for partial extraction. read_zipnow filters system files (e.g.,__MACOSX/,.DS_Store) by default, with an opt-in toggle.
Directory
Improvements
movefunction enhanced withforce_overwriteparameter and conflict checks (raisesFileExistsErrororOSErrorif destination exists and not a directory).renamenow explicitly raisesFileExistsErrorfor existing destinations, improving predictability.- Added
check_conflicthelper for safer path operations during recursive moves.
File
Improvements
- Refined
split_filedocumentation and behavior: Clarifies original file preservation, specifies.fsp{index}naming, and adds explicit raises forIOErrorandPermissionError. reassemble_fileoptimized to delete parts only after successful concatenation, reducing partial failure risks.
This update also includes the following enhancements and bug fixes:
New Features
- Integrated Console styling into core update notifications for colored, user-friendly messages (e.g., blue notices, green upgrade prompts).
Improvements
- Unified error propagation across modules with descriptive messages and consistent exception types for better debugging.
- Expanded docstrings in all updated modules with detailed parameters, returns, raises, and examples for improved developer experience.
- Performance tweak in
WinTerm.get_attrs()to bitwise-OR new style flags without recalculating base attributes.
Bug Fixes
- Resolved potential attribute clobbering in Win32 console by separately tracking light, underline, and strikethrough flags in
WinTerm. - Fixed incomplete OSC regex handling in
AnsiToWin32.convert_oscto properly process title changes without truncation. - Addressed version comparison edge cases in
__checkupdates__by filtering only digits, preventing non-numeric tag mismatches (though semver parsing recommended for future).
FileSystem Pro 2.0.1.0
This update introduces significant enhancements, including new implementations, changes, and bug fixes, to improve the overall performance and functionality of FileSystemPro. It ensures a more robust and efficient experience for users, with detailed improvements across various modules.
Watcher Module
- Improved Watcher with a new function
get_changes
The new get_changes function allows monitoring directory changes with a specified delay and optional logging to a file. This enhancement enables real-time tracking of file modifications, creations, and deletions.
Compression Module
- Added new documentation inside each function to guide users on how to use it. (Applied in all compression modules, including compression, compression.tarfile, compression.zipfile)
File Module
- Added the
copy()function (file.copy()) - Added the
get_filename()function (file.get_filename())
Device Module
- Extended
get_boot_drive_name()function to support Windows and Linux.
Fixes
General
- Fixed the README file where some HTML tags were breaking on preview on GitHub
Device Module
- Fixed mountpoint path format on function
current_disk_filesystem_name()when running on Windows.
FileSystem Pro 2.0.0.0
FileSystemPro 2.0 introduces a range of new features and enhancements to help you manage and monitor your system's devices more efficiently. With the integration of the psutil library, the new Device module offers comprehensive functionality for interacting with storage devices and monitoring CPU performance. Additionally, the new Compression module provides powerful tools for creating, extracting, and reading compressed archive files in tar and zip formats.
Device Module
from filesystem import deviceThe Device module includes powerful tools for managing and retrieving detailed information about your system's disks and CPU.
Disks
from filesystem.device import disksThe Disks part of the Device module provides functionalities for retrieving various disk-related information and metrics, such as disk partitions, boot drive names, filesystem types, and storage metrics. It also includes filtering capabilities to narrow down the information based on specific criteria.
- Current Disk Filesystem Name: Returns the name of the current disk filesystem.
- Boot Time: Provides the system's boot time.
- Disk Partitions: Retrieves disk partitions.
- Boot Drive Name: Returns the name of the boot drive.
- Filter by Device: Filters disk partitions based on the device.
- Filter by Filesystem Type: Filters disk partitions based on filesystem type.
- Filter by Mount Point: Filters disk partitions based on the mount point.
- Filter by Options: Filters disk partitions based on options.
- Storage Metrics: Provides storage metrics for a specific mount point.
- Disk Info: Displays detailed information about the disks.
- Disk I/O Counters: Returns disk I/O counters.
CPU
from filesystem.device import cpuThe CPU part of the Device module provides functionalities for retrieving various CPU-related information, such as CPU usage percentage, CPU times, and the number of CPU cores. It offers essential metrics for monitoring CPU performance.
- CPU Usage Percentage: Returns the CPU usage percentage.
- CPU Usage Times: Provides CPU usage times.
- CPU Count: Returns the number of CPUs (logical cores) available in the system.
These new features empower developers with enhanced tools to efficiently manage and monitor storage devices and CPU performance.
Compression Module (#79)
from filesystem import compressionThe Compression module is responsible for creating, extracting, and reading compressed archive files in tar and zip formats. It leverages Python's built-in tarfile and zipfile modules to handle these operations efficiently.
Tarfile (#78)
- Create Tar Archive: Compresses a single file, directory, or a list of files/directories into a tar archive.
- Extract Tar Archive: Extracts files from a tar archive to a specified destination. It can extract all files or a specified list of files.
- Read Tar Archive: Reads and lists the contents of a tar archive.
Zipfile
- Create Zip Archive: Compresses a single file, directory, or a list of files/directories into a zip archive.
- Extract Zip Archive: Extracts files from a zip archive to a specified destination. It can extract all files or a specified list of files. (#74)
- Read Zip Archive: Reads and lists the contents of a zip archive.
Directory Module
from filesystem import directoryThe Directory library has received an update with the addition of the get_size function and a change in the logic of the get_directories function.
- Get Size: Calculates the total size of all files in the specified directory, returned in bytes, KB, MB, GB, or TB. (#82)
- Get Directories: Lists all directories in a specified path, with the fullpath parameter defaulting to True.
File Module
from filesystem import fileThis update introduces significant improvements to the File module.
- Append Text: Adds text directly to the file without automatically including a new line at the end. (#77)
- Create File: Now includes an overwrite parameter for greater flexibility in handling file operations. (#76)
- Find Duplicates: Moved from the Wrapper module to the File module.
- Get Size: Calculates the total size of all files in the specified directory, returned in bytes, KB, MB, GB, or TB. (#81)
Wrapper Module
from filesystem import wrapperIn this new version, some functions from the Wrapper module have been relocated to other modules or have become obsolete to improve the organization and efficiency of the code. (#80)
- Combine Paths: Now available in the Directory module.
- Create Directory: Now available in the Directory module.
- Create File: Now available in the File module.
- Delete Path: Now available in both the Directory and File modules.
- Enumerate Files: Now available in the File module.
- Find Duplicates: Now available in the File module.
- Get Files: Now available in the File module.
- Get Size: Now available in both the Directory and File modules.
- Join Paths: Now available in the Directory module.
- List Directories: Now available in the Directory module.
- List Files: Now available in the File module.
- Make Zip: Became obsolete. Use the Compression module.
- Read Zip File Contents: Became obsolete. Use the Compression module.
FileSystem Module
import filesystem as fsFileSystemPro 2.0 introduces significant changes for managing file paths on Windows, ensuring accurate and efficient path retrieval.
- Registry-Based Path Retrieval: The module now uses the
winregmodule to retrieve accurate paths from the Windows registry. (#33)
Updated Paths
For Windows, the paths are now retrieved using the winreg module for better accuracy:
- Desktop: Retrieves the path to the current user's Desktop folder using the registry.
- Documents: Retrieves the path to the current user's Documents folder using the registry.
- Downloads: Retrieves the path to the current user's Downloads folder using the registry.
- Music: Retrieves the path to the current user's Music folder using the registry.
- Pictures: Retrieves the path to the current user's Pictures folder using the registry.
- Videos: Retrieves the path to the current user's Videos folder using the registry.
Example Usage
The following example demonstrates how to access the Videos folder using the FileSystem library:
import filesystem as fs
print(fs.videos)These changes were made to enhance the modularity and maintainability of the library. We appreciate your continued support and feedback, which are essential for these improvements.
FileSystem Pro 1.0.4.0
We are thrilled to introduce the latest version of FileSystemPro, packed with new features and enhancements designed to improve your experience.
File
We are excited to introduce the latest update to our File module, designed to enhance your file management experience with improved functionality and performance. This module now includes several powerful functions designed to streamline your workflow and improve efficiency.
Added append_text function:
Function Addition: The append_text function was added to the File Module to handle appending text to files.
The function includes parameters for specifying the file path and the text to append.
Error Handling: Added error handling to manage cases where the file does not exist or cannot be accessed.
Return Value: The function now returns a boolean indicating the success or failure of the append operation.
Added get_extension function: (#62)
Function Addition: The get_extension function was added to the File Module to handle extracting the file extension from a given file path. The function includes parameters for specifying the file path and whether the extension should be returned in lowercase or uppercase.
Error Handling: The function does not include explicit error handling, assuming the provided file path is valid.
Return Value: The function returns the file extension as a string, either in lowercase or uppercase based on the lower parameter.
These updates enhance the function’s flexibility and ensure consistent handling of file extensions across different use cases
Changes in create function:
The default value of the encoding parameter has been changed from utf-8-sig to utf-8.
The utf-8-sig encoding includes a Byte Order Mark (BOM) at the beginning of the file, which can cause issues with some applications that do not expect it. The utf-8 encoding does not include a BOM, making it more universally compatible.
This update ensures better compatibility and avoids potential issues related to the BOM in UTF-8 encoded files.
Changes in get_files function: (#71)
- Parameters Added:
- fullpath (bool): A new parameter that, when set to
True, returns the full path of each file. Defaults to False. - extension (str): A new parameter that filters files by the specified extension. Defaults to
None.
- fullpath (bool): A new parameter that, when set to
- Functionality Enhancements:
- Full Path Retrieval: The function now has the capability to return the full path of files if
fullpathis set toTrue. - Extension Filtering: The function can now filter and return only files with the specified extension if the
extensionparameter is provided.
- Full Path Retrieval: The function now has the capability to return the full path of files if
- Backward Compatibility:
- The function maintains backward compatibility by defaulting the new parameters (
fullpathandextension) toFalseandNone, respectively, ensuring that existing code using the old function signature will still work without modification.
- The function maintains backward compatibility by defaulting the new parameters (
These updates enhance the flexibility and functionality of the
get_filesfunction, making it more versatile for different use cases.
Directory
The Directory module has undergone several significant updates to enhance its functionality and usability. Here are the key changes:
Changes in delete function:
The recent change in the delete function of the Directory module includes a modification to the condition that checks if a directory exists. Previously, the function used os.path.exists(path) to check for the directory’s existence. This has been updated to use the exists(path) function instead.
This change ensures that the custom
existsfunction is used consistently throughout the module.
Changes in exists function:
The exists function has been simplified for better readability and efficiency. The else statement has been removed, as it is redundant. Now, if os.path.isdir(path) returns True, the function will return True. If not, it will directly return False without needing an else block.
Changes in get_directories function:
The get_directories function in the code has been updated to include an additional parameter fullpath.
-
New Parameter:
fullpath(default is False) When set to True, the function returns the full path of each directory. -
Conditional Logic: Added logic to append the full path of directories to the list if
fullpathis True.
These changes enhance the function’s flexibility by allowing it to return either directory names or full paths based on the
fullpathparameter.
Wrapper
With this update, the Wrapper module now offers a more convenient method for handling ZIP files, enhancing its overall functionality and user experience.
Added read_zip_file_contents function: (#65)
This function is designed to read the contents of a ZIP file.
The function aims to simplify the process of extracting and reading files within a ZIP archive, making it easier for users to handle ZIP files within the FileSystemPro library.
The new function takes a single parameter, zip_filename, which is the path to the ZIP file. It reads the contents of the ZIP file and returns them in a structured format.
Users can call this function to quickly access the contents of a ZIP file without manually handling the extraction process.
These changes enhance the functionality of the Wrapper module by providing a convenient method for working with ZIP files.
Please take a moment to familiarize yourself with these changes.
Let's continue to work together to improve FileSystem Pro!
Bisneto.
FileSystem Pro 1.0.3.0
New Features
Directory Module: (#54)
A new module for directory operations has been introduced. The Directory module is a component of the FileSystemPro library that provides a collection of functions
for handling directory-related operations. It simplifies tasks such as path manipulation,
directory creation and deletion, and file retrieval within directories.
File Module
A new module dedicated to file operations has been added. The File module is a comprehensive utility toolset that forms part of the FileSystemPro library.
It provides a suite of functions designed to handle various file operations such as integrity checks,
file creation, deletion, enumeration, and file splitting and reassembling.
Enhancements
Several improvements were made to the FileSystemPro, particularly in the Wrapper, Watcher, and Documentation. Below are key enhancements:
- Duplicate File Finder: Within the Wrapper module, a function to find duplicate files has been implemented. (#43)
- Size Calculation: A function to calculate the size of files or directories in various units has been added to the Wrapper module. (#61)
- Extension Check: The Wrapper module now includes a function to check for file path extensions.
- Project Description: Updated the project description in the Setup.py file and the GitHub repository.
- Documentation: Enhanced code with comprehensive documentation
- File Splitter/Joiner: Introduced tools for splitting and joining files. (#41)
- Checksum Verification: Added functionality for verifying file integrity through checksums. (#36)
- Binary File Creation: Implemented a feature to create binary files. (#18)
FileSystemPro have been updated with enhanced error handling mechanisms. This improvement significantly boosts the security and stability of filesystem operations, ensuring a smoother and safer user experience.
Changes
- Platform Name: Updated the platform name from Mac to macOS. (#25)
- Watcher Module Update: Modified the Watcher module to import functions from the new File module.
Support
- Wrapper Module: Some functions in the Wrapper module are now under support. It is recommended to use the Directory and File Modules instead.
FileSystem Pro 1.0.2.0
Improvements
- Version Check: Implemented a function to check for updates to the FileSystemPro library.
- Update Notification: Added a notification system to alert users of new releases.
- Installation Instructions: Provided clear instructions for updating the library using pip.
This update enhances the user experience by ensuring they are always working with the latest version of the library, with easy-to-follow steps for upgrading.
Console
Console is a robust library designed to enable ANSI escape character sequences, which are used for generating coloured terminal text and cursor positioning. This library is a key addition to FileSystemPro as a third-party library, enhancing the toolkit for developers who require consistent terminal styling across different operating systems.
from filesystem import console- ANSI Escape Sequences: Integrated the open source library Colorama to enhance the Console with ANSI escape character sequences, enabling coloured terminal text and cursor positioning
- Cross-Platform Compatibility: Ensured that the new Console implementation works seamlessly across different platforms, including Windows, by utilizing Colorama's functionality to strip ANSI sequences and convert them into appropriate win32 calls.
- Simplified API: Provided a simple cross-platform API for printing coloured terminal text from Python, making it easier for developers to create visually appealing console output
- Enhanced Output: Improved the visual output of the Console by supporting various formatting constants like foreground, background, and style, allowing for a more customised and readable display.
- Simplified Integration: With no dependencies other than the standard library, integrating Console into your projects is straightforward. It’s tested across multiple Python versions, ensuring reliability.
- Effortless Transition: For developers transitioning to FileSystemPro, incorporating Console into your workflow is effortless, enabling you to maintain the visual aspects of your terminal applications without platform constraints.
This update brings a significant enhancement to the Console's capabilities, offering a more robust and user-friendly experience for FileSystemPro users.
Documentation (README)
- Enhanced Documentation: Introduced a clear and structured table that lists all methods with corresponding explanations, improving the readability and accessibility of the documentation.
- Method Overview: Provided a concise summary for each method, allowing users to quickly understand the purpose and usage of the FileSystemPro toolkit functions.
- User-Friendly Format: Adopted a tabular format to organize the method information, which enhances the user experience by making it easier to navigate through the documentation.
- Improved Clarity: The table format helps to distinguish between different methods and their descriptions, ensuring that users can find the information they need without confusion.
This update aims to make the FileSystemPro documentation more user-friendly and informative, aiding developers in utilising the toolkit more effectively.
Changes
Wrapper
- wrapper.delete: (
def delete(path, recursive=False):)- Enhanced Error Handling: Changed behavior for non-existent directory operations. The system now raises an Exception instead of printing an error message, providing a more robust error handling mechanism.
- Strict Directory Deletion Policy: Modified the response to attempts at deleting non-empty directories. The library will now raise an Exception to enforce the use of the recursive parameter when necessary, ensuring safer file operations.
Developer Notes
These updates require developers to handle exceptions in their code where FileSystemPro functions are utilized.
Ensure that proper try-except blocks are implemented to maintain the application’s stability.
Update any relevant documentation to guide users through the new error handling process.
Let's continue to work together to improve FileSystem Pro!
Bisneto.
FileSystem Pro 1.0.1.0
FileSystem Pro 1.0.1 includes the following improvements:
-
Platform Import: We have imported the
platformfrom thesysmodule. -
OS Separator: We have defined
OS_SEPARATORasos.sep. This attribute in theosmodule represents the character used by the operating system to separate pathname components. This will help us create file paths in a cross-platform compatible way. -
New Function - Combine: A new function
combine(*args, paths=[])has been added to the Wrapper. (#19)Learn more about
combinefunction by reading the docs -
New Function - Join: A new function
join(path1='', path2='', path3='', path4='', paths=[])has been added to the Wrapper. (#19)Learn more about
joinfunction by reading the docs -
Update to Create File Function: The
create_file(file_name, path, text, encoding="utf-8-sig")function now creates a file in UTF-8 by default encode. (#16) -
Function Replacement: The
get_path_properties(pathname)function has been replaced byget_object(path).
Please take a moment to familiarize yourself with these changes. Let's continue to work together to improve FileSystem Pro!
Bisneto.
FileSystem Pro 1.0.0.0
Initial release