diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-04-11 16:14:57 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-04-11 16:14:57 +0100 |
commit | edca57b49e88d179d996652a44f7d6ba5b9ca729 (patch) | |
tree | 2a95a3bd6f790b1cda0510a8853fefa3d6eb9ee8 /sysprep/utils.mli | |
parent | b8fbbcf79147ee88c605726d74b2672b765e4d21 (diff) | |
download | libguestfs-edca57b49e88d179d996652a44f7d6ba5b9ca729.tar.gz libguestfs-edca57b49e88d179d996652a44f7d6ba5b9ca729.tar.xz libguestfs-edca57b49e88d179d996652a44f7d6ba5b9ca729.zip |
sysprep: Add utils.mli (interface) file.
Diffstat (limited to 'sysprep/utils.mli')
-rw-r--r-- | sysprep/utils.mli | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/sysprep/utils.mli b/sysprep/utils.mli new file mode 100644 index 00000000..f9cf16c8 --- /dev/null +++ b/sysprep/utils.mli @@ -0,0 +1,39 @@ +(* virt-sysprep + * Copyright (C) 2010-2012 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + *) + +(** Utility functions. *) + +val (//) : string -> string -> string +(** Filename concatenation. *) + +val string_prefix : string -> string -> bool +(** [string_prefix str prefix] returns true iff [prefix] is a prefix + of [str]. *) + +val string_find : string -> string -> int +(** [string_find str sub] finds [sub] in [str]. It returns the index + (position) in the string, or [-1] if not found. *) + +val string_split : string -> string -> string list +(** [string_split sep str] splits [str] at [sep] (maybe multiple + times), returning a list of strings. *) + +val string_random8 : unit -> string +(** Return a random 8 character string, suitable as a temporary + filename since every filesystem supports at least 8 character + filenames. *) |