termux / termux/termux-api

Request `termux-saf-realpath` and `termux-saf-realname` feature

Open
#498 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
4.3k
Forks
920
PR merge metrics
No merged PRs in 30d

Description

I really appreciate the new SAF API. On top of the current utils, it would be good to have realpath equivalent and get name of the file.
Feature description

  • termux-saf-realpath returns the URI in path. If it is online storage (e.g. GDrive), then perhaps return a empty string
  • termux-saf-realname returns to name of the file
    Reference implementation
    Nasib's answer in this stackoverflow post seems promising to handle media files.
    Many more stackoverflow posts should help.

I may make pull requests if it's preferred and when I have time to write and test the codes. Thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing SAF API utilities and the linked Stack Overflow reference implementation for handling media-file URIs. Done means adding termux-saf-realpath and termux-saf-realname behavior, including the stated empty result for online storage where a real path is unavailable, and testing the commands with supported files.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
cli, mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.