Remove some debugging prints and add comments
[maxima.git] / doc / info / operatingsystem.texi
blob0e36ac17af1ba9c3d0ce68f7110b8b5906a0c566
1 @menu
2 * Introduction to operatingsystem::
3 * Directory operations::
4 * File operations::
5 * Environment operations::
6 @end menu
8 @node Introduction to operatingsystem, Directory operations, Package operatingsystem, Package operatingsystem
9 @section Introduction to operatingsystem
11 Package @code{operatingsystem} contains functions for operatingsystem-tasks, like file system operations.
14 @node Directory operations, File operations, Introduction to operatingsystem, Package operatingsystem
15 @section Directory operations
18 @anchor{chdir}
19 @deffn {Function} chdir (@var{dir})
20 Change to directory @var{dir}
21 @end deffn
23 @anchor{mkdir}
24 @deffn {Function} mkdir (@var{dir})
25 Create directory @var{dir}
26 @end deffn
28 @anchor{rmdir}
29 @deffn {Function} rmdir (@var{dir})
30 remove directory @var{dir}
31 @end deffn
33 @anchor{getcurrentdirectory}
34 @deffn {Function} getcurrentdirectory ()
35 returns the current working directory.
37 See also @mrefdot{directory}
39 @end deffn
41 Examples:
43 @example
44 (%i1) load("operatingsystem")$
45 (%i2) mkdir("testdirectory")$
46 (%i3) chdir("testdirectory")$
47 (%i4) chdir("..")$
48 (%i5) rmdir("testdirectory")$
49 @end example
51 @node File operations, Environment operations, Directory operations, Package operatingsystem
52 @section File operations
55 @anchor{copy_file}
56 @deffn {Function} copy_file (@var{file1}, @var{file2})
57 copies file @var{file1} to @var{file2}
58 @end deffn
60 @anchor{rename_file}
61 @deffn {Function} rename_file (@var{file1}, @var{file2})
62 renames file @var{file1} to @var{file2}
63 @end deffn
65 @anchor{delete_file}
66 @deffn {Function} delete_file (@var{file1})
67 deletes file @var{file1}
68 @end deffn
71 @node Environment operations, , File operations, Package operatingsystem
72 @section Environment operations
75 @anchor{getenv}
76 @deffn {Function} getenv (@var{env})
77 Get the value of the environment variable @var{env}
79 Example:
81 @example
82 (%i1) load("operatingsystem")$
83 (%i2) getenv("PATH");
84 (%o2) /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
85 @end example
87 @end deffn