/// @returns a space_info structure filled with the capacity, free, and
/// available space on the device \a Path is on. A platform specific error_code
/// is returned on error.
-ErrorOr<space_info> disk_space(const Twine Path);
+ErrorOr<space_info> disk_space(const Twine &Path);
/// This class represents a memory mapped file. It is based on
/// boost::iostreams::mapped_file.
return UniqueID(fs_st_dev, fs_st_ino);
}
-ErrorOr<space_info> disk_space(const Twine Path) {
+ErrorOr<space_info> disk_space(const Twine &Path) {
struct STATVFS Vfs;
if (::STATVFS(Path.str().c_str(), &Vfs))
return std::error_code(errno, std::generic_category());
return UniqueID(VolumeSerialNumber, FileID);
}
-ErrorOr<space_info> disk_space(const Twine Path) {
+ErrorOr<space_info> disk_space(const Twine &Path) {
PULARGE_INTEGER Avail, Total, Free;
if (!::GetDiskFreeSpaceExA(Path.str().c_str(), &Avail, &Total, &Free))
return mapWindowsError(::GetLastError());