forked from ocaml/opam
/
Types.Filename.html
129 lines (129 loc) · 8.54 KB
/
Types.Filename.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="Types.Stdlib_filename.html">
<link rel="next" href="Types.V.html">
<link rel="Up" href="Types.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Client" rel="Chapter" href="Client.html">
<link title="File" rel="Chapter" href="File.html">
<link title="File_format" rel="Chapter" href="File_format.html">
<link title="Parallel" rel="Chapter" href="Parallel.html">
<link title="Path" rel="Chapter" href="Path.html">
<link title="Process" rel="Chapter" href="Process.html">
<link title="Repositories" rel="Chapter" href="Repositories.html">
<link title="Run" rel="Chapter" href="Run.html">
<link title="Solver" rel="Chapter" href="Solver.html">
<link title="Types" rel="Chapter" href="Types.html"><title>Types.Filename</title>
</head>
<body>
<div class="navbar"><a href="Types.Stdlib_filename.html">Previous</a>
<a href="Types.html">Up</a>
<a href="Types.V.html">Next</a>
</div>
<center><h1>Module <a href="type_Types.Filename.html">Types.Filename</a></h1></center>
<br>
<pre><span class="keyword">module</span> Filename: <code class="code">sig</code> <a href="Types.Filename.html">..</a> <code class="code">end</code></pre>non-directory filenames<br>
<hr width="100%">
<pre><span class="keyword">include</span> <a href="Types.ABSTRACT.html">Types.ABSTRACT</a></pre>
<pre><span id="VALcreate"><span class="keyword">val</span> create</span> : <code class="type"><a href="Types.html#TYPEdirname">Types.dirname</a> -> <a href="Types.html#TYPEbasename">Types.basename</a> -> t</code></pre><div class="info">
Create a filename from a dirname and a basename<br>
</div>
<pre><span id="VALof_basename"><span class="keyword">val</span> of_basename</span> : <code class="type"><a href="Types.html#TYPEbasename">Types.basename</a> -> t</code></pre><div class="info">
Create a file from a basename and the current working directory
as dirname<br>
</div>
<pre><span id="VALraw"><span class="keyword">val</span> raw</span> : <code class="type">string -> t</code></pre><div class="info">
Creation from a raw string (as <i>http://<path></i>)<br>
</div>
<pre><span id="VALdirname"><span class="keyword">val</span> dirname</span> : <code class="type">t -> <a href="Types.html#TYPEdirname">Types.dirname</a></code></pre><div class="info">
Return the directory name<br>
</div>
<pre><span id="VALbasename"><span class="keyword">val</span> basename</span> : <code class="type">t -> <a href="Types.html#TYPEbasename">Types.basename</a></code></pre><div class="info">
Return the base name<br>
</div>
<pre><span id="VALread"><span class="keyword">val</span> read</span> : <code class="type">t -> Raw.t</code></pre><div class="info">
Retrieves the contents from the hard disk.<br>
</div>
<pre><span id="VALremove"><span class="keyword">val</span> remove</span> : <code class="type">t -> unit</code></pre><div class="info">
Removes everything in <code class="code">filename</code> if existed.<br>
</div>
<pre><span id="VALwrite"><span class="keyword">val</span> write</span> : <code class="type">t -> Raw.t -> unit</code></pre><div class="info">
Removes everything in <code class="code">filename</code> if existed, then write <code class="code">contents</code> instead.<br>
</div>
<pre><span id="VALexists"><span class="keyword">val</span> exists</span> : <code class="type">t -> bool</code></pre><div class="info">
see <code class="code">Sys.file_exists</code><br>
</div>
<pre><span id="VALcheck_suffix"><span class="keyword">val</span> check_suffix</span> : <code class="type">t -> string -> bool</code></pre><div class="info">
Check whether a file has a given suffix<br>
</div>
<pre><span id="VALadd_extension"><span class="keyword">val</span> add_extension</span> : <code class="type">t -> string -> t</code></pre><div class="info">
Add a file extension<br>
</div>
<pre><span id="VALchop_extension"><span class="keyword">val</span> chop_extension</span> : <code class="type">t -> t</code></pre><div class="info">
Remove the file extension<br>
</div>
<pre><span id="VALlist"><span class="keyword">val</span> list</span> : <code class="type"><a href="Types.html#TYPEdirname">Types.dirname</a> -> t list</code></pre><div class="info">
List all the filenames (ie. which are not directories) in a directory<br>
</div>
<pre><span id="VALrec_list"><span class="keyword">val</span> rec_list</span> : <code class="type"><a href="Types.html#TYPEdirname">Types.dirname</a> -> t list</code></pre><div class="info">
List all the filenames, recursively<br>
</div>
<pre><span id="VALwith_raw"><span class="keyword">val</span> with_raw</span> : <code class="type">(Raw.t -> 'a) -> t -> 'a</code></pre><div class="info">
Apply a function on the contents of a file<br>
</div>
<pre><span id="VALcopy_in"><span class="keyword">val</span> copy_in</span> : <code class="type">t -> <a href="Types.html#TYPEdirname">Types.dirname</a> -> unit</code></pre><div class="info">
Copy a file in a directory<br>
</div>
<pre><span id="VALmove"><span class="keyword">val</span> move</span> : <code class="type">t -> t -> unit</code></pre><div class="info">
Move a file<br>
</div>
<pre><span id="VALlink_in"><span class="keyword">val</span> link_in</span> : <code class="type">t -> <a href="Types.html#TYPEdirname">Types.dirname</a> -> unit</code></pre><div class="info">
Symlink a file in a directory<br>
</div>
<pre><span id="VALcopy"><span class="keyword">val</span> copy</span> : <code class="type">t -> t -> unit</code></pre><div class="info">
Copy a file<br>
</div>
<pre><span id="VALlink"><span class="keyword">val</span> link</span> : <code class="type">t -> t -> unit</code></pre><div class="info">
Symlink a file. If symlink is not possible on the system, use copy instead.<br>
</div>
<pre><span id="VALextract"><span class="keyword">val</span> extract</span> : <code class="type">t -> <a href="Types.html#TYPEdirname">Types.dirname</a> -> unit</code></pre><div class="info">
Extract an archive in a given directory (it rewrites the root to
match <code class="code">dirname</code> dir if needed)<br>
</div>
<pre><span id="VALextract_in"><span class="keyword">val</span> extract_in</span> : <code class="type">t -> <a href="Types.html#TYPEdirname">Types.dirname</a> -> unit</code></pre><div class="info">
Extract an archive in a given directory (which should already exists)<br>
</div>
<pre><span id="VALstarts_with"><span class="keyword">val</span> starts_with</span> : <code class="type"><a href="Types.html#TYPEdirname">Types.dirname</a> -> t -> bool</code></pre><div class="info">
Check wether a filename starts by a given dirname<br>
</div>
<pre><span id="VALremove_prefix"><span class="keyword">val</span> remove_prefix</span> : <code class="type">prefix:<a href="Types.html#TYPEdirname">Types.dirname</a> -> t -> string</code></pre><div class="info">
Remove a prefix from a file name<br>
</div>
<pre><span id="VALdownload"><span class="keyword">val</span> download</span> : <code class="type">t -> <a href="Types.html#TYPEdirname">Types.dirname</a> -> t option</code></pre><div class="info">
download a remote file in a given directory. Return the location
of the downloaded file if the download is successful.<br>
</div>
<pre><span id="VALdownload_iter"><span class="keyword">val</span> download_iter</span> : <code class="type">t list -> <a href="Types.html#TYPEdirname">Types.dirname</a> -> t option</code></pre><div class="info">
iterate downloads until one is sucessful<br>
</div>
<pre><span id="VALpatch"><span class="keyword">val</span> patch</span> : <code class="type">t -> <a href="Types.html#TYPEdirname">Types.dirname</a> -> bool</code></pre><div class="info">
Apply a patch to a directory<br>
</div>
<pre><span id="VALdigest"><span class="keyword">val</span> digest</span> : <code class="type">t -> string</code></pre><div class="info">
Compute the MD5 digest of a file<br>
</div>
<pre><span id="VALtouch"><span class="keyword">val</span> touch</span> : <code class="type">t -> unit</code></pre><div class="info">
Create an empty file<br>
</div>
<pre><span id="VALchmod"><span class="keyword">val</span> chmod</span> : <code class="type">t -> int -> unit</code></pre><div class="info">
Change file permissions<br>
</div>
</body></html>