(* OCaml-Win32
 * win32_volume.ml
 * Copyright (c) 2002-2004 by Harry Chomsky
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *)

open Win32_core

(********************************************************************)
(* System Services: Files and I/O: SDK Documentation: Storage: Storage Reference: Volume Management Reference *)

external get_drive_type : root:string option -> drive_type = "get_drive_type"

external get_logical_drives : unit -> bool array = "get_logical_drives"

external get_logical_drive_strings : unit -> string array = "get_logical_drive_strings"

type file_system_flag =
    FILE_SUPPORTS_ENCRYPTION
  | FILE_SUPPORTS_OBJECT_IDS
  | FILE_SUPPORTS_REPARSE_POINTS
  | FILE_SUPPORTS_SPARSE_FILES
  | FILE_VOLUME_QUOTAS
  | FS_CASE_IS_PRESERVED
  | FS_CASE_SENSITIVE
  | FS_FILE_COMPRESSION
  | FS_PERSISTENT_ACLS
  | FS_UNICODE_STORED_ON_DISK
  | FS_VOL_IS_COMPRESSED
type volume_information = {
    vi_volume_name : string;
    vi_volume_serial_number : int32;
    vi_max_component_length : int;
    vi_file_system_flags : file_system_flag list;
    vi_file_system_name : string }
external get_volume_information : path:string option -> volume_information = "get_volume_information"

external set_volume_label : root:string option -> label:string option -> unit = "set_volume_label"
