Example #1
0
        public static bool IsVolumeCaseSensitive(string path)
        {
            if (PInvokeOK)
            {
                StringBuilder VolLabel   = new StringBuilder(256); // Label
                UInt32        VolFlags   = new UInt32();
                StringBuilder FSName     = new StringBuilder(256); // File System Name
                UInt32        SerNum     = 0;
                UInt32        MaxCompLen = 0;

                PInvokeHelper.GetVolumeInformationWrapper(path,
                                                          VolLabel,
                                                          (UInt32)VolLabel.Capacity,
                                                          ref SerNum,
                                                          ref MaxCompLen,
                                                          ref VolFlags,
                                                          FSName,
                                                          (UInt32)FSName.Capacity);

                return((((VolumeFlags)VolFlags) & VolumeFlags.CaseSensitive) == VolumeFlags.CaseSensitive);
            }

            if (IsUnix)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }