Skip to content

This front end development tool. Get Relative Path is used to search between From path - to path.

Notifications You must be signed in to change notification settings

zzasaa-jpg/Path-Resolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Frontend Path Resolver

Details of stack, third party, programming language

  • FrontEnd
  • No third party
  • Java script

A simple frontend-only tool to resolve relative paths between files inside a folder. Users can upload a directory, and calculate the relative path from one file to another. No data is saved on the server; everything happens in the browser, making it safe and private.


πŸš€ Features

  • Upload an entire folder from your local system.
  • Compute the relative path between two files.
  • Output only the relative path (like ../folder_name/file_name.file_extension).
  • Works completely in the browser β€” no backend required.
  • Safe and private: uploaded files are not stored anywhere.

πŸ› οΈ How It Works

  1. Upload Directory
    Use the folder upload input to select a directory. The browser reads all files and their relative paths using File.webkitRelativePath.

  2. Get Relative Path
    Enter the From file and To file. The tool calculates the relative path using a custom JavaScript function:

    • Splits paths into parts.
    • Finds the common base folder.
    • Moves up from the source file to the common base.
    • Moves down to the target file.

⚑ Safety

  • Frontend-only: All operations happen in the browser.
  • No files are uploaded to a server.
  • No personal data is stored.
  • Only the file names and relative paths are temporarily stored in memory during the session.

πŸ“¦ Usage

  1. Open index.html in a modern browser (Chrome, Edge, etc.).
  2. Click Upload Directory and select a folder.
  3. Use the Search box to find files.
  4. Enter the From file and To file, then click Get Relative Path.
  5. The relative path will be displayed below.

πŸ“ Notes

  • Make sure to use folder upload (not individual files) for correct paths.
  • The tool uses webkitdirectory β€” currently supported in Chrome, Edge, and some Chromium-based browsers.
  • For best results, type the file names or partial paths accurately.

βš™οΈ Tech Stack

  • HTML
  • CSS
  • JavaScript (Vanilla, ES6)
  • Browser APIs (File, FileList, webkitRelativePath)

About

This front end development tool. Get Relative Path is used to search between From path - to path.

Topics

Resources

Stars

Watchers

Forks