How to get user's home folder in Lua plugin

Explorer ,
Sep 02, 2022 Sep 02, 2022

Copy link to clipboard

Copied

Hi all, I want write plugin that read metadata from catalog and export as text file.

I want to put exported files on user's home, but I can not find method described to obtain users home 

on API documents.

Any suggestions are welcome.

TOPICS
SDK

Views

37

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Sep 02, 2022 Sep 02, 2022

LrPathUtils.standardizePath( '~' ) works on Mac but not Windows.  Instead, use LrPathUtils.getStandardFilePath ("home").

Likes

Translate

Translate
Participant ,
Sep 02, 2022 Sep 02, 2022

Copy link to clipboard

Copied

LrPathUtils.standardizePath( '~' )

 

should do the job for you.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 02, 2022 Sep 02, 2022

Copy link to clipboard

Copied

LATEST

LrPathUtils.standardizePath( '~' ) works on Mac but not Windows.  Instead, use LrPathUtils.getStandardFilePath ("home").

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines