Пример #1
0
        /// <summary>
        /// Get the available disk space for a path.
        /// </summary>
        /// <param name="directoryPath">The path to a valid directory.</param>
        /// <returns>Available disk space, in bytes.</returns>
        public static long GetAvailableFreeSpace(string directoryPath)
        {
            DriveInfo volumeName = new DriveInfo(DirectoryHelper.GetVolumeName(directoryPath));

            return(GetAvailableFreeSpace(volumeName));
        }