mirror of
https://github.com/YGGverse/titanit.git
synced 2026-04-01 01:25:31 +00:00
build short uri
This commit is contained in:
parent
2532b3e11c
commit
a5e345eaa8
2 changed files with 20 additions and 1 deletions
|
|
@ -89,6 +89,14 @@ impl Item {
|
|||
|
||||
// Getters
|
||||
|
||||
pub fn to_uri(&self, directory: &str) -> String {
|
||||
self.path
|
||||
.to_str()
|
||||
.unwrap()
|
||||
.replace(directory, "")
|
||||
.replace("/", "")
|
||||
}
|
||||
|
||||
/* @TODO implement short links handle without slash
|
||||
pub fn alias(&self, relative: &str) -> String {} */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue