/*.log
/test/
-/doc/apidocs/
-/doc/graphs/
+/Documentation/apidocs/
+/Documentation/graphs/
/.classpath
/.factorypath
## Project Info
- **License:** Creative Commons Zero (CC0)
-- **Java Version:** 8
+- **Java Version:** 21
- **Package:** `eu.svjatoslav.commons`
## Dependencies
| Dependency | Scope | Purpose |
|-----------------|----------|----------------------------|
| junit 4.8.1 | test | Unit testing |
-| servlet-api 2.5 | provided | Servlet support (optional) |
## Package Structure
### `eu.svjatoslav.commons.file`
- **IOHelper** - File I/O utilities (recursive delete, read/write files, smart overwrite)
- **FilePathParser** - Extract file extensions, names without extensions, format file sizes
-- **CommonPathResolver** - Resolve common system paths (home directory)
### `eu.svjatoslav.commons.gui.dialog`
- **ExceptionDialog** - Swing dialog for displaying exceptions with stack traces
--- /dev/null
+#+SETUPFILE: ~/.emacs.d/org-styles/html/darksun.theme
+#+TITLE: Svjatoslav Commons - Java library of commonly used functions
+#+LANGUAGE: en
+#+LATEX_HEADER: \usepackage[margin=1.0in]{geometry}
+#+LATEX_HEADER: \usepackage{parskip}
+#+LATEX_HEADER: \usepackage[none]{hyphenat}
+
+#+OPTIONS: H:20 num:20
+#+OPTIONS: author:nil
+
+#+HTML_HEAD: <link rel="stylesheet" href="style.css"/>
+
+* Introduction
+:PROPERTIES:
+:CUSTOM_ID: introduction
+:END:
+
+Svjatoslav Commons is a shared Java utility library that consolidates
+commonly needed functionality: reading and writing files, manipulating
+strings, handling binary data, and displaying errors to users.
+
+The library requires Java 21 and has no runtime dependencies; only JUnit
+is used, for testing. See [[#usage][How to
+take library into use]] for Maven dependency configuration. The complete
+API documentation is available in the [[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/][JavaDoc]].
+
+* How to take library into use
+:PROPERTIES:
+:CUSTOM_ID: usage
+:END:
+
+Add the *svjatoslavcommons* dependency to your Maven project:
+
+#+BEGIN_SRC xml
+ <dependencies>
+ <dependency>
+ <groupId>eu.svjatoslav</groupId>
+ <artifactId>svjatoslavcommons</artifactId>
+ <version>1.9</version>
+ </dependency>
+ </dependencies>
+#+END_SRC
+
+Also add the repository (the library is not on Maven Central):
+
+#+BEGIN_SRC xml
+ <repositories>
+ <repository>
+ <id>svjatoslav.eu</id>
+ <name>Svjatoslav repository</name>
+ <url>https://www3.svjatoslav.eu/maven/</url>
+ </repository>
+ </repositories>
+#+END_SRC
+
+* Library contents
+:PROPERTIES:
+:CUSTOM_ID: library-contents
+:END:
+- See [[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/][JavaDoc]].
+
+** String utilities ([[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/string/package-summary.html][eu.svjatoslav.commons.string]])
+:PROPERTIES:
+:CUSTOM_ID: string-utilities
+:END:
+
+The string package provides a mutable string builder optimized for
+prefix and suffix operations, plus simple glob-style pattern matching.
+
+[[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/string/String2.html][String2]] is a mutable string that stores characters in a list, enabling
+efficient operations at both ends. It provides ~prepend()~ and ~append()~
+for adding text, ~trimPrefix()~ and ~trimSuffix()~ for removing characters,
+~trimPrefixIfExists()~ and ~trimSuffixIfExists()~ for conditional removal,
+~hasPrefix()~ and ~hasSuffix()~ for checking, ~repeat()~ for duplication,
+and ~enforceLength()~ for padding or truncating to exact lengths. All
+methods return the same instance for fluent chaining.
+
+[[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/string/GlobMatcher.html][GlobMatcher]] matches strings against glob-style wildcard patterns using
+~*~ (matches any sequence of characters, including empty) and ~?~ (matches
+exactly one character). This is simpler than regular expressions and
+useful for file name filtering, simple validation, or user-friendly
+pattern input.
+
+** File system utilities ([[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/file/package-summary.html][eu.svjatoslav.commons.file]])
+:PROPERTIES:
+:CUSTOM_ID: file-system-utilities
+:END:
+
+The file package provides utilities for common file operations: reading
+and writing files, parsing paths, and formatting file sizes.
+
+[[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/file/IOHelper.html][IOHelper]] is the primary file I/O class. It reads and writes files as
+byte arrays or UTF-8 strings, deletes files and directories
+recursively (without following symbolic links, which prevents accidental
+deletion of data outside the intended scope), and overwrites files only
+when content actually differs, avoiding unnecessary disk writes and
+preserving timestamps.
+
+[[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/file/FilePathParser.html][FilePathParser]] extracts metadata from file paths: the file extension
+(lowercase normalized), the file name without extension, and formats
+file sizes using binary units (b, KiB, MiB, GiB, TiB, PiB) with
+human-readable descriptions like "15 MiB".
+
+** Binary data utilities ([[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/data/package-summary.html][eu.svjatoslav.commons.data]])
+:PROPERTIES:
+:CUSTOM_ID: binary-data-utilities
+:END:
+
+The data package provides classes for working with binary data at the
+bit level and converting it to human-readable formats.
+
+[[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/data/BitInputStream.html][BitInputStream]] and [[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/data/BitOutputStream.html][BitOutputStream]] allow reading and writing
+individual bits from streams, not just whole bytes. This is essential
+for applications that work with bit-packed data formats where data is
+not byte-aligned, such as custom compression algorithms, network
+protocols, or binary file formats. Bits are processed from most
+significant to least significant within each byte, and you can read or
+write any number of bits (not just multiples of 8).
+
+[[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/data/HexConverter.html][HexConverter]] converts byte arrays to uppercase hexadecimal strings.
+Each byte becomes exactly two characters (0-9, A-F), making binary data
+visible in logs, debug output, or text-based protocols. Null inputs
+return null; empty arrays return empty strings.
+
+** Tokenizer ([[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/string/tokenizer/package-summary.html][eu.svjatoslav.commons.string.tokenizer]])
+:PROPERTIES:
+:CUSTOM_ID: tokenizer
+:END:
+
+The tokenizer package provides a regex-based tokenizer for parsing
+structured text into tokens with lookahead and backtracking support.
+
+[[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/string/tokenizer/Tokenizer.html][Tokenizer]] is the main class. You add [[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/string/tokenizer/Terminator.html][Terminator]] objects that define
+token boundaries using regex patterns. Each terminator has a strategy:
+~PRESERVE~ returns matched tokens for processing, ~DROP~ silently discards
+them (useful for whitespace or comments). You can peek at the next token
+without consuming it, unread tokens to backtrack, expect specific tokens
+and throw exceptions on mismatch, and categorize tokens using group
+names.
+
+[[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/string/tokenizer/TokenizerMatch.html][TokenizerMatch]] is the result object containing the matched text, the
+terminator that identified it, the regex matcher (for extracting capture
+groups), and methods to check group membership.
+
+[[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/string/tokenizer/InvalidSyntaxException.html][InvalidSyntaxException]] is thrown when expectations fail during parsing,
+such as when expecting a specific token but finding something else.
+
+** Graphical dialogs ([[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/gui/dialog/package-summary.html][eu.svjatoslav.commons.gui.dialog]])
+:PROPERTIES:
+:CUSTOM_ID: graphical-dialogs
+:END:
+
+The dialog package provides Swing-based components for displaying
+information to users in graphical applications.
+
+[[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/gui/dialog/ExceptionDialog.html][ExceptionDialog]] displays exceptions with their full stack traces in a
+windowed dialog. It shows the exception type, error message, cause (if
+present), and complete stack trace, making it easy to debug errors in
+GUI applications without requiring console output or log files. Note:
+this requires a graphical environment and is not suitable for headless
+or server-side applications.
+
+* Source code
+:PROPERTIES:
+:CUSTOM_ID: source-code
+:ID: 978b7ea2-e246-45d0-be76-4d561308e9f3
+:END:
+
+*This program is free software: released under Creative Commons Zero
+(CC0) license*
+
+*Program author:*
+- Svjatoslav Agejenko
+- Homepage: https://svjatoslav.eu
+- Email: mailto:svjatoslav@svjatoslav.eu
+- See also: [[https://www.svjatoslav.eu/projects/][Other software projects hosted at svjatoslav.eu]]
+
+*Getting the source code:*
+- [[https://www2.svjatoslav.eu/gitweb/?p=svjatoslav_commons.git;a=snapshot;h=HEAD;sf=tgz][Download latest snapshot in TAR GZ format]]
+- [[https://www2.svjatoslav.eu/gitweb/?p=svjatoslav_commons.git;a=summary][Browse Git repository online]]
+- Clone Git repository using command:
+ : git clone https://www2.svjatoslav.eu/git/svjatoslav_commons.git
+
+** Building from source :gap:
+:PROPERTIES:
+:CUSTOM_ID: building-from-source
+:ID: ceadc583-a9d8-435b-9ba8-c564d3b64ff4
+:END:
+
+The library builds with Maven on JDK 21 or newer (the compiler targets
+Java 21). On Debian 13 install one of the packaged JDKs:
+
+: sudo apt install openjdk-21-jdk # or: openjdk-25-jdk
+
+Then clone and build:
+
+: git clone https://www2.svjatoslav.eu/git/svjatoslav_commons.git
+: cd svjatoslav_commons
+: mvn clean package
+
+This runs the unit tests and produces
+=target/svjatoslavcommons-<version>.jar= together with sources and
+JavaDoc jars. =mvn clean install= additionally installs the library
+into the local Maven repository (=~/.m2/repository=), making the
+snapshot available to other projects on the same machine.
--- /dev/null
+.flex-center {
+ display: flex;
+ justify-content: center;
+}
+
+.flex-center video {
+ width: min(90%, 1000px);
+ height: auto;
+}
+
+.responsive-img {
+ width: min(100%, 1000px);
+ height: auto;
+}
+
+/* === SVG diagram theme === */
+svg > rect:first-child {
+ fill: #061018;
+}
+
+svg text[fill="#666"],
+svg text[fill="#999"] {
+ fill: #aaa !important;
+}
+
+svg line[stroke="#ccc"] {
+ stroke: #445566 !important;
+}
+
+svg {
+ background-color: #061018;
+ border-radius: 8px;
+ display: block;
+ margin: 0 auto;
+}
\ No newline at end of file
}
export_org_files_to_html() {
- echo "🔍 Searching for .org files in doc/ ..."
+ echo "🔍 Searching for .org files in Documentation/ ..."
echo "======================================="
- mapfile -t ORG_FILES < <(find doc -type f -name "*.org" | sort)
+ mapfile -t ORG_FILES < <(find Documentation -type f -name "*.org" | sort)
if [ ${#ORG_FILES[@]} -eq 0 ]; then
echo "❌ No .org files found!"
mvn clean package
# Put generated JavaDoc HTML files to documentation directory
-rm -rf doc/apidocs/
-cp -r target/apidocs/ doc/
+rm -rf Documentation/apidocs/
+cp -r target/apidocs/ Documentation/
# Publish Emacs org-mode files into HTML format
export_org_files_to_html
## Upload assembled documentation to server
echo "📤 Uploading to server..."
-rsync -avz --delete -e 'ssh -p 10006' doc/ \
+rsync -avz --delete -e 'ssh -p 10006' Documentation/ \
n0@www3.svjatoslav.eu:/mnt/big/projects/svjatoslav_commons/
if [ $? -eq 0 ]; then
+++ /dev/null
-#+SETUPFILE: ~/.emacs.d/org-styles/html/darksun.theme
-#+TITLE: Svjatoslav Commons - Java library of commonly used functions
-#+LANGUAGE: en
-#+LATEX_HEADER: \usepackage[margin=1.0in]{geometry}
-#+LATEX_HEADER: \usepackage{parskip}
-#+LATEX_HEADER: \usepackage[none]{hyphenat}
-
-#+OPTIONS: H:20 num:20
-#+OPTIONS: author:nil
-
-#+begin_export html
-<style>
- .flex-center {
- display: flex; /* activate flexbox */
- justify-content: center; /* horizontally center anything inside */
- }
-
- .flex-center video {
- width: min(90%, 1000px); /* whichever is smaller wins */
- height: auto; /* preserve aspect ratio */
- }
-
- .responsive-img {
- width: min(100%, 1000px);
- height: auto;
- }
-
-
- .flex-center {
- display: flex;
- justify-content: center;
- }
- .flex-center video {
- width: min(90%, 1000px);
- height: auto;
- }
- .responsive-img {
- width: min(100%, 1000px);
- height: auto;
- }
-
-
- /* === SVG diagram theme === */
- svg > rect:first-child {
- fill: #061018;
- }
-
- /* Lighten axis/helper labels that were dark-on-light */
- svg text[fill="#666"],
- svg text[fill="#999"] {
- fill: #aaa !important;
- }
-
- /* Lighten dashed axis lines */
- svg line[stroke="#ccc"] {
- stroke: #445566 !important;
- }
-
- svg {
- background-color: #061018;
- border-radius: 8px;
- display: block;
- margin: 0 auto;
- }
-</style>
-#+end_export
-
-
-* Introduction
-
-Svjatoslav Commons is a shared Java utility library that consolidates
-commonly needed functionality: reading and writing files, manipulating
-strings, handling binary data, and displaying errors to users.
-
-The library requires Java 8 and has minimal dependencies: only JUnit
-for testing and servlet-api (optional, provided scope). See [[#usage][How to
-take library into use]] for Maven dependency configuration. The complete
-API documentation is available in the [[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/][JavaDoc]].
-
-* Library contents
-:PROPERTIES:
-:CUSTOM_ID: library-contents
-:END:
-- See [[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/][JavaDoc]].
-
-** Binary data utilities ([[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/data/package-summary.html][eu.svjatoslav.commons.data]])
-
-The data package provides classes for working with binary data at the
-bit level and converting it to human-readable formats.
-
-[[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/data/BitInputStream.html][BitInputStream]] and [[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/data/BitOutputStream.html][BitOutputStream]] allow reading and writing
-individual bits from streams, not just whole bytes. This is essential
-for applications that work with bit-packed data formats where data is
-not byte-aligned, such as custom compression algorithms, network
-protocols, or binary file formats. Bits are processed from most
-significant to least significant within each byte, and you can read or
-write any number of bits (not just multiples of 8).
-
-[[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/data/HexConverter.html][HexConverter]] converts byte arrays to uppercase hexadecimal strings.
-Each byte becomes exactly two characters (0-9, A-F), making binary data
-visible in logs, debug output, or text-based protocols. Null inputs
-return null; empty arrays return empty strings.
-
-** File system utilities ([[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/file/package-summary.html][eu.svjatoslav.commons.file]])
-
-The file package provides utilities for common file operations: reading
-and writing files, parsing paths, and resolving system directories.
-
-[[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/file/IOHelper.html][IOHelper]] is the primary file I/O class. It reads and writes files as
-byte arrays or UTF-8 strings, deletes files and directories
-recursively (without following symbolic links, which prevents accidental
-deletion of data outside the intended scope), and overwrites files only
-when content actually differs, avoiding unnecessary disk writes and
-preserving timestamps.
-
-[[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/file/FilePathParser.html][FilePathParser]] extracts metadata from file paths: the file extension
-(lowercase normalized), the file name without extension, and formats
-file sizes using binary units (b, KiB, MiB, GiB, TiB, PiB) with
-human-readable descriptions like "15 MiB".
-
-[[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/file/CommonPathResolver.html][CommonPathResolver]] resolves common system paths. Currently it provides
-the user's home directory, useful for storing application configuration
-files or user-specific data.
-
-** Graphical dialogs ([[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/gui/dialog/package-summary.html][eu.svjatoslav.commons.gui.dialog]])
-
-The dialog package provides Swing-based components for displaying
-information to users in graphical applications.
-
-[[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/gui/dialog/ExceptionDialog.html][ExceptionDialog]] displays exceptions with their full stack traces in a
-windowed dialog. It shows the exception type, error message, cause (if
-present), and complete stack trace, making it easy to debug errors in
-GUI applications without requiring console output or log files. Note:
-this requires a graphical environment and is not suitable for headless
-or server-side applications.
-
-** String utilities ([[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/string/package-summary.html][eu.svjatoslav.commons.string]])
-
-The string package provides a mutable string builder optimized for
-prefix and suffix operations, plus simple glob-style pattern matching.
-
-[[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/string/String2.html][String2]] is a mutable string that stores characters in a list, enabling
-efficient operations at both ends. It provides ~prepend()~ and ~append()~
-for adding text, ~trimPrefix()~ and ~trimSuffix()~ for removing characters,
-~trimPrefixIfExists()~ and ~trimSuffixIfExists()~ for conditional removal,
-~hasPrefix()~ and ~hasSuffix()~ for checking, ~repeat()~ for duplication,
-and ~enforceLength()~ for padding or truncating to exact lengths. All
-methods return the same instance for fluent chaining.
-
-[[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/string/GlobMatcher.html][GlobMatcher]] matches strings against glob-style wildcard patterns using
-~*~ (matches any sequence of characters, including empty) and ~?~ (matches
-exactly one character). This is simpler than regular expressions and
-useful for file name filtering, simple validation, or user-friendly
-pattern input.
-
-** Tokenizer ([[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/string/tokenizer/package-summary.html][eu.svjatoslav.commons.string.tokenizer]])
-
-The tokenizer package provides a regex-based tokenizer for parsing
-structured text into tokens with lookahead and backtracking support.
-
-[[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/string/tokenizer/Tokenizer.html][Tokenizer]] is the main class. You add [[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/string/tokenizer/Terminator.html][Terminator]] objects that define
-token boundaries using regex patterns. Each terminator has a strategy:
-~PRESERVE~ returns matched tokens for processing, ~DROP~ silently discards
-them (useful for whitespace or comments). You can peek at the next token
-without consuming it, unread tokens to backtrack, expect specific tokens
-and throw exceptions on mismatch, and categorize tokens using group
-names.
-
-[[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/string/tokenizer/TokenizerMatch.html][TokenizerMatch]] is the result object containing the matched text, the
-terminator that identified it, the regex matcher (for extracting capture
-groups), and methods to check group membership.
-
-[[https://www3.svjatoslav.eu/projects/svjatoslav_commons/apidocs/eu/svjatoslav/commons/string/tokenizer/InvalidSyntaxException.html][InvalidSyntaxException]] is thrown when expectations fail during parsing,
-such as when expecting a specific token but finding something else.
-
-* How to take library into use
-:PROPERTIES:
-:CUSTOM_ID: usage
-:END:
-
-Add the *svjatoslavcommons* dependency to your Maven project:
-
-#+BEGIN_SRC xml
- <dependencies>
- <dependency>
- <groupId>eu.svjatoslav</groupId>
- <artifactId>svjatoslavcommons</artifactId>
- <version>1.9</version>
- </dependency>
- </dependencies>
-#+END_SRC
-
-Also add the repository (the library is not on Maven Central):
-
-#+BEGIN_SRC xml
- <repositories>
- <repository>
- <id>svjatoslav.eu</id>
- <name>Svjatoslav repository</name>
- <url>https://www3.svjatoslav.eu/maven/</url>
- </repository>
- </repositories>
-#+END_SRC
-
-* Source code
-:PROPERTIES:
-:CUSTOM_ID: source-code
-:ID: 978b7ea2-e246-45d0-be76-4d561308e9f3
-:END:
-
-*This program is free software: released under Creative Commons Zero
-(CC0) license*
-
-*Program author:*
-- Svjatoslav Agejenko
-- Homepage: https://svjatoslav.eu
-- Email: mailto://svjatoslav@svjatoslav.eu
-- See also: [[https://www.svjatoslav.eu/projects/][Other software projects hosted at svjatoslav.eu]]
-
-*Getting the source code:*
-- [[https://www2.svjatoslav.eu/gitweb/?p=svjatoslav_commons.git;a=snapshot;h=HEAD;sf=tgz][Download latest snapshot in TAR GZ format]]
-- [[https://www2.svjatoslav.eu/gitweb/?p=svjatoslav_commons.git;a=summary][Browse Git repository online]]
-- Clone Git repository using command:
- : git clone https://www2.svjatoslav.eu/git/svjatoslav_commons.git
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
- <source>8</source>
- <target>8</target>
+ <source>21</source>
+ <target>21</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
-
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- <scope>provided</scope>
- </dependency>
</dependencies>
<distributionManagement>
+++ /dev/null
-/*
- * Svjatoslav Commons - shared library of common functionality. Author: Svjatoslav Agejenko.
- * This project is released under Creative Commons Zero (CC0) license.
- */
-package eu.svjatoslav.commons.file;
-
-import java.io.File;
-
-/**
- * Resolves common system paths and directories.
- *
- * <p>This utility class provides static methods to obtain common file system
- * paths that are frequently needed in applications, such as the user's home
- * directory, configuration directories, or temporary directories.</p>
- *
- * <p>Currently provides:</p>
- * <ul>
- * <li>User home directory - the personal directory of the current user</li>
- * </ul>
- *
- * <p>Example usage:</p>
- * <pre>{@code
- * File homeDir = CommonPathResolver.getHomeDirectory();
- * File configFile = new File(homeDir, ".myapp/config.properties");
- * }</pre>
- *
- * <p>This class is designed to be extended with additional common path
- * resolution methods as needed.</p>
- *
- */
-public class CommonPathResolver {
-
- /**
- * Private constructor to prevent instantiation.
- *
- * <p>This is a utility class with only static methods. It does not need
- * to be instantiated.</p>
- */
- private CommonPathResolver() {}
-
- /**
- * Returns the current user's home directory.
- *
- * <p>This is typically the personal directory of the logged-in user,
- * such as:</p>
- * <ul>
- * <li>On Linux/Mac: "/home/username" or "/Users/username"</li>
-* <li>On Windows: "C:\\Users\\username"</li>
- * </ul>
- *
- * <p>This is a convenient location for storing user-specific configuration
- * files, documents, and application data.</p>
- *
- * <p>Example usage:</p>
- * <pre>{@code
- * File home = CommonPathResolver.getHomeDirectory();
- * System.out.println("Home directory: " + home.getAbsolutePath());
- *
- * // Create an application config directory
- * File configDir = new File(home, ".myapp");
- * configDir.mkdirs();
- * }</pre>
- *
- * @return a File object representing the user's home directory.
- * The directory typically exists and is readable/writable
- * by the current user.
- */
- public static File getHomeDirectory() {
- return new File(System.getProperty("user.home"));
- }
-
-}
\ No newline at end of file
* reading/writing files, and smart file overwriting</li>
* <li>{@link eu.svjatoslav.commons.file.FilePathParser} - Parse file paths to extract extensions,
* file names, and format file sizes</li>
- * <li>{@link eu.svjatoslav.commons.file.CommonPathResolver} - Resolve common system paths
- * such as user home directory</li>
* </ul>
*
* <p>These utilities simplify common file operations that would otherwise require
* @since 1.0
* @see eu.svjatoslav.commons.file.IOHelper
* @see eu.svjatoslav.commons.file.FilePathParser
- * @see eu.svjatoslav.commons.file.CommonPathResolver
*/
package eu.svjatoslav.commons.file;
\ No newline at end of file