1
0
mirror of https://github.com/sasjs/core.git synced 2026-01-17 13:30:05 +00:00

feat: mfv_getpathuri macro to get the uri of a file or folder

Also refactoring mv_createfolder.sas
This commit is contained in:
allan
2025-05-18 18:48:18 +01:00
parent 51042cbd47
commit 667198e5c0
9 changed files with 229 additions and 47 deletions

View File

@@ -0,0 +1,35 @@
/**
@file
@brief Testing mfv_getpathuri macro function
<h4> SAS Macros </h4>
@li mf_uid.sas
@li mfv_getpathuri.sas
@li mp_assert.sas
@li mv_createfile.sas
**/
options mprint sgen;
%let file=%mf_uid();
/* create a folder */
filename somefile temp;
data _null_;
file somefile;
put 'hello testings';
run;
%let path=&mcTestAppLoc/temp;
%mv_createfile(path=&path, name=&file..txt,inref=somefile)
%mp_assert(
iftrue=(%mfv_existfile(&path/&file..txt)=1),
desc=Check if created file exists
)
%mp_assert(
iftrue=(%length(%mfv_getpathuri(&path/&file..txt))>0),
desc=Check that a URI was returned
)