ParaMonte MATLAB 3.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
getContents.m
Go to the documentation of this file.
1
%> \brief
2
%> Return the contents of the ``.bash_profile`` file
3
%> in the system
home
folder as a scalar MATLAB
string
.<br>
4
%>
5
%> \return
6
%> ``str`` : The output scalar MATLAB
string
containing the contents
7
%> of the ``.bash_profile`` file
if
it exists or an empty
string
.<br>
8
%>
9
%> \interface{
getContents
}
10
%> \code{.m}
11
%>
12
%> str = pm.sys.bash_profile.getContents()
13
%>
14
%> \endcode
15
%>
16
%> \example{
getContents
}
17
%> \include{lineno} example/sys/bash_profile/
getContents
/main.m
18
%> \output{
getContents
}
19
%> \include{lineno} example/sys/bash_profile/
getContents
/main.out.m
20
%>
21
%> \final{
getContents
}
22
%>
23
%> \author
24
%> \JoshuaOsborne, May 21 2024, 4:57 AM, University of Texas at Arlington<br>
25
%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
26
%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for
Computational Engineering and Sciences (ICES), UT Austin<br>
27
function str =
getContents
()
28
path = fullfile(pm.sys.path.
home
(), ".bash_profile");
29
if isfile(path)
30
str =
string
(fileread(path));
31
else
32
str = "";
33
end
34
end
getContents
function getContents()
Return the contents of the .bash_profile file in the system home folder as a scalar MATLAB string.
home
function home()
Return a MATLAB string containing the absolute path to the system home directory.
src
matlab
main
+pm
+sys
+bash_profile
getContents.m
Generated on Mon Dec 2 2024 10:04:17 for ParaMonte MATLAB 3.0.0 by
1.9.3