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

@@ -21,20 +21,33 @@ data _null_;
file somefile;
put 'hello testings';
run;
%mv_createfile(path=&mcTestAppLoc/temp, name=&file..txt,inref=somefile)
%mv_createfile(path=&mcTestAppLoc/temp, name=&file..txt,inref=somefile,mdebug=1)
%mp_assert(
iftrue=(%mfv_existfile(&mcTestAppLoc/temp/&file..txt)=1),
desc=Check if created file exists
)
%put TEST 2 - html file;
filename f2 temp;
data _null_;
file f2;
put '<html><body><p>Hello world</p></body></html>';
run;
%mv_createfile(path=&mcTestAppLoc/temp, name=test.html,inref=f2,mdebug=1)
%mp_assert(
iftrue=(%mfv_existfile(&mcTestAppLoc/temp/test.html)=1),
desc=Check if created file exists
)
%put TEST 2 - dataset upload ;
data temp;
x=1;
run;
filename ds "%sysfunc(pathname(work))/temp.sas7bdat";
%mv_createfile(path=&mcTestAppLoc/temp, name=&file..sas7bdat,inref=ds)
%mv_createfile(path=&mcTestAppLoc/temp, name=&file..sas7bdat,inref=ds,mdebug=1)
%mp_assert(
iftrue=(%mfv_existfile(&mcTestAppLoc/temp/&file..sas7bdat)=1),