1 (* Copyright 2001, 2002 b8_bavard, b8_fee_carabine, INRIA *)
3 This file is part of mldonkey.
5 mldonkey is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 mldonkey is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with mldonkey; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 val verbose
: bool ref
24 val get_max_cache_size
: unit -> int
25 val set_max_cache_size
: int -> unit
26 val max_cache_size_default
: int
28 val external_start
: unit -> unit
29 val external_exit
: unit -> unit
30 val uname
: unit -> string
31 val os_supported
: unit -> bool
33 val create_file_mode
: int ref
34 val create_dir_mode
: int ref
36 (* val force_fd : t -> Unix.file_descr *)
38 (* val seek64 : t -> int64 -> Unix.seek_command -> int64 *)
39 val getsize
: string -> int64
40 val getsize64
: t
-> int64
41 (* size, sparse flag *)
42 val ftruncate64
: t
-> int64
-> bool -> unit
44 val close_all
: unit -> unit
47 val filename
: t
-> string
48 val rename
: t
-> string -> unit
49 val mtime
: string -> float
50 val mtime64
: t
-> float
51 val owner
: string -> (string * string)
53 val flush
: unit -> unit
54 val flush_fd
: t
-> unit
55 val buffered_write
: t
-> int64
-> string -> int -> int -> unit
56 val buffered_write_copy
: t
-> int64
-> string -> int -> int -> unit
57 val write
: t
-> int64
-> string -> int -> int -> unit
58 val max_buffered
: int64
ref
59 val remove
: t
-> unit
61 val read
: t
-> int64
-> string -> int -> int -> unit
62 (*val allocate_chunk : t -> int64 -> int -> unit*)
64 val copy_chunk
: t
-> t
-> int64
-> int64
-> int -> unit
66 val file_exists
: string -> bool
68 val apply_on_chunk
: t
-> int64
-> int64
->
69 (Unix.file_descr
-> int64
-> 'a
) -> 'a
72 val create_diskfile
: string -> bool -> t
73 val create_ro
: string -> t
74 val create_rw
: string -> t
77 [create_multifile dirname writable files]: create a directory
78 [dirname] containing the files in [files]. [files] is a list of tuples
79 [(filename, size)] where [filename] is relative inside the directory
80 [dirname] and [size] is the size of the files.
83 val create_multifile
:
84 string -> bool -> (string * int64
) list
-> t
86 val create_sparsefile
: string -> bool -> t
88 val ro_flag
: Unix.open_flag list
89 val rw_flag
: Unix.open_flag list
91 val destroy
: t
-> unit
95 val destroyed
: t
-> bool
97 val bsize
: string -> int64
option
98 val blocks
: string -> int64
option
99 val bfree
: string -> int64
option
100 val bavail
: string -> int64
option
101 val fnamelen
: string -> int option
102 val disktotal
: string -> int64
option
103 val diskfree
: string -> int64
option
104 val diskused
: string -> int64
option
105 val percentused
: string -> int option
106 val percentfree
: string -> int option
107 val filesystem
: string -> string
108 val subfile_tree_map
: t
-> (string -> int64
-> int64
-> int64
-> unit) -> unit
109 val find_file
: t
-> int64
-> (string * int64
* int64
)
110 val find_file_index
: t
-> int -> (string * int64
* int64
)