[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #48221] prefdir should not be a private functi
From: |
Guillaume |
Subject: |
[Octave-bug-tracker] [bug #48221] prefdir should not be a private function |
Date: |
Tue, 14 Jun 2016 09:22:19 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0 |
URL:
<http://savannah.gnu.org/bugs/?48221>
Summary: prefdir should not be a private function
Project: GNU Octave
Submitted by: gyom
Submitted on: Tue 14 Jun 2016 09:22:16 AM GMT
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: None
Assigned to: None
Originator Name: Guillaume
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
At the moment, prefdir is implemented in scripts/prefs/private/prefdir.m and
is therefore not accessible from the command line while it should be for
Matlab compatibility, see:
http://www.mathworks.com/help/matlab/ref/prefdir.html
Before I noticed this file in Octave, I also implemented my own version that
might provide a better compatibility with Matlab:
## -*- texinfo -*-
## @deftypefn {} {} prefdir
## @deftypefnx {} address@hidden =} prefdir
## @deftypefnx {} address@hidden =} prefdir (1)
## Return the name of the directory containing Octave's preferences.
##
## @var{D} is a string containing the name of the directory containing
## Octave's preferences. The directory may or may not exist.
##
## If 1 is provided as an input, the preference directory is created if
## it does not yet exist.
##
## @seealso{addpref, getpref, setpref, ispref, rmpref}
## @end deftypefn
function retval = prefdir (varargin)
retval = fullfile (get_home_directory (), '.octave', version ());
if (nargin ~= 0 && ~exist (retval, 'dir'))
mkdir (retval);
endif
endfunction
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?48221>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #48221] prefdir should not be a private function,
Guillaume <=