@sasjs/core 4.13.1 → 4.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server/ms_getfile.sas +32 -0
package/package.json
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@file
|
|
3
|
+
@brief Gets a file from SASjs Drive
|
|
4
|
+
@details Fetches a file on SASjs Drive and stores it in the output fileref.
|
|
5
|
+
|
|
6
|
+
Example:
|
|
7
|
+
|
|
8
|
+
%ms_getfile(/some/stored/file.ext, outref=myfile)
|
|
9
|
+
|
|
10
|
+
@param [in] driveloc The full path to the file in SASjs Drive
|
|
11
|
+
@param [out] outref= (msgetfil) The fileref to contain the file.
|
|
12
|
+
@param [in] mdebug= (0) Set to 1 to enable DEBUG messages
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
**/
|
|
16
|
+
|
|
17
|
+
%macro ms_getfile(driveloc
|
|
18
|
+
,outref=msgetfil
|
|
19
|
+
,mdebug=0
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
filename &outref temp;
|
|
23
|
+
|
|
24
|
+
proc http method='GET' out=&outref
|
|
25
|
+
url="&_sasjs_apiserverurl/SASjsApi/drive/file?filePath=&driveloc";
|
|
26
|
+
%if &mdebug=1 %then %do;
|
|
27
|
+
debug level=2;
|
|
28
|
+
%end;
|
|
29
|
+
run;
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
%mend ms_getfile;
|