Rename getter functions

This commit is contained in:
Trickshotblaster 2023-07-04 15:11:30 -07:00
parent 2dbffcc6b7
commit 99936bcb1a
5 changed files with 11 additions and 11 deletions

View file

@ -17,7 +17,7 @@ static PUBLIC_DIRECTORY_NAME: &str = "public";
/// 1. `/opt/websurfx` if it not present here then it fallbacks to the next one (2)
/// 2. Under project folder ( or codebase in other words) if it is not present
/// here then it returns an error as mentioned above.
pub fn get_public_path() -> Result<String, Error> {
pub fn public_path() -> Result<String, Error> {
if Path::new(format!("/opt/websurfx/{}/", PUBLIC_DIRECTORY_NAME).as_str()).exists() {
return Ok(format!("/opt/websurfx/{}", PUBLIC_DIRECTORY_NAME));
}