UNPKG

agentsqripts

Version:

Comprehensive static code analysis toolkit for identifying technical debt, security vulnerabilities, performance issues, and code quality problems

45 lines (43 loc) 2.19 kB
/** * @file Cross-platform path manipulation utilities for consistent file system operations * @description Single responsibility: Aggregate specialized path operations with platform independence * * This path utility aggregation module provides unified access to cross-platform path * manipulation functions used throughout the AgentSqripts analysis platform. It re-exports * specialized single-function modules that handle path resolution, joining, extraction, * and conversion operations while ensuring consistent behavior across different operating systems. * * Design rationale: * - Cross-platform compatibility ensures consistent behavior on Windows, macOS, and Linux * - Single Responsibility Principle compliance through focused path operation modules * - Centralized path handling prevents platform-specific bugs across analyzers * - Standardized path operations improve code maintainability and reliability * - Independent function modules enable targeted testing of path manipulation logic * * Path operation categories: * - Resolution: Absolute path resolution with proper normalization * - Extraction: Directory name and base name extraction from full paths * - Joining: Safe path concatenation with proper separator handling * - Conversion: Relative path calculation and cross-platform normalization * - Validation: Path format checking and accessibility verification */ const resolvePath = require('./path-utils/resolve/resolvePath'); const getDirname = require('./path-utils/get/getDirname'); const getBasename = require('./path-utils/get/getBasename'); const joinPaths = require('./path-utils/join/joinPaths'); const getRelativePath = require('./path-utils/get/getRelativePath'); const normalizePath = require('./path-utils/normalize/normalizePath'); const getPathExtension = require('./path-utils/get/getPathExtension'); const changePathExtension = require('./path-utils/change/changePathExtension'); const isAbsolutePath = require('./path-utils/validate/isAbsolutePath'); module.exports = { resolvePath, getDirname, getBasename, joinPaths, getRelativePath, normalizePath, getPathExtension, changePathExtension, isAbsolutePath };