163 references to SR
System.Formats.Tar (163)
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (18)
126new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, path), path) : 127new FileNotFoundException(SR.IO_FileNotFound); 134new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, path), path) : 138new DirectoryNotFoundException(SR.IO_PathNotFound_NoPathName); 145new UnauthorizedAccessException(SR.Format(SR.UnauthorizedAccess_IODenied_Path, path), inner) : 146new UnauthorizedAccessException(SR.UnauthorizedAccess_IODenied_NoPathName, inner); 150new PathTooLongException(SR.Format(SR.IO_PathTooLong_Path, path)) : 151new PathTooLongException(SR.IO_PathTooLong); 155new IOException(SR.Format(SR.IO_SharingViolation_File, path), errorInfo.RawErrno) : 156new IOException(SR.IO_SharingViolation_NoFileName, errorInfo.RawErrno); 162return new ArgumentOutOfRangeException("value", SR.ArgumentOutOfRange_FileLengthTooBig); 167return new IOException(SR.Format(SR.IO_FileExists_Name, path), errorInfo.RawErrno);
src\runtime\src\libraries\Common\src\System\IO\SubReadStream.cs (7)
32throw new ArgumentException(SR.IO_NotSupported_UnreadableStream, nameof(superStream)); 65throw new NotSupportedException(SR.IO_NotSupported_UnseekableStream); 166throw new NotSupportedException(SR.IO_NotSupported_UnreadableStream); 248throw new NotSupportedException(SR.IO_NotSupported_UnseekableStream); 261throw new IOException(SR.IO_SeekBeforeBegin); 270public override void SetLength(long value) => throw new NotSupportedException(SR.IO_NotSupported_UnwritableStream); 272public override void Write(byte[] buffer, int offset, int count) => throw new NotSupportedException(SR.IO_NotSupported_UnwritableStream);
System\Formats\Tar\GnuSparseStream.cs (13)
81throw new InvalidDataException(SR.TarInvalidNumber); 92throw new InvalidDataException(SR.TarInvalidNumber, ex); 124throw new NotSupportedException(SR.IO_NotSupported_UnseekableStream); 138throw new NotSupportedException(SR.IO_NotSupported_UnseekableStream); 151throw new IOException(SR.IO_SeekBeforeBegin); 342throw new InvalidOperationException(SR.IO_NotSupported_UnseekableStream); 486throw new InvalidDataException(SR.TarInvalidNumber); 496throw new InvalidDataException(SR.TarInvalidNumber); 502throw new InvalidDataException(SR.TarInvalidNumber); 512throw new InvalidDataException(SR.TarInvalidNumber); 522throw new InvalidDataException(SR.TarInvalidNumber); 563public override void SetLength(long value) => throw new NotSupportedException(SR.IO_NotSupported_UnwritableStream); 565public override void Write(byte[] buffer, int offset, int count) => throw new NotSupportedException(SR.IO_NotSupported_UnwritableStream);
System\Formats\Tar\PosixTarEntry.cs (2)
61throw new InvalidOperationException(SR.TarEntryBlockOrCharacterExpected); 88throw new InvalidOperationException(SR.TarEntryBlockOrCharacterExpected);
System\Formats\Tar\TarEntry.cs (25)
57throw new ArgumentException(SR.TarCannotConvertPaxGlobalExtendedAttributesEntry, nameof(other)); 137throw new InvalidOperationException(SR.TarEntryHardLinkOrSymLinkExpected); 218throw new InvalidOperationException(SR.Format(SR.TarEntryTypeNotSupportedForExtracting, EntryType)); 253return Task.FromException(new InvalidOperationException(SR.Format(SR.TarEntryTypeNotSupportedForExtracting, EntryType))); 275throw new InvalidOperationException(SR.Format(SR.TarEntryDoesNotSupportDataStream, Name, EntryType)); 280throw new ArgumentException(SR.IO_NotSupported_UnreadableStream, nameof(value)); 375throw new IOException(SR.Format(SR.TarExtractingResultsFileOutside, name, destinationDirectoryPath)); 389throw new IOException(SR.Format(SR.TarExtractingResultsLinkOutside, linkName, destinationDirectoryPath)); 396throw new IOException(SR.Format(SR.TarExtractingResultsLinkOutside, linkName, destinationDirectoryPath)); 411throw new IOException(SR.Format(SR.TarExtractingResultsLinkOutside, linkName, destinationDirectoryPath)); 632throw new InvalidOperationException(SR.Format(SR.TarEntryTypeNotSupportedForExtracting, EntryType)); 643throw new IOException(SR.Format(SR.IO_PathNotFound_Path, filePath)); 654throw new IOException(SR.Format(SR.IO_AlreadyExists_Name, filePath)); 660throw new IOException(SR.Format(SR.IO_AlreadyExists_Name, filePath));
System\Formats\Tar\TarFile.cs (24)
65throw new ArgumentException(SR.IO_NotSupported_UnwritableStream, nameof(destination)); 70throw new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, sourceDirectoryName), sourceDirectoryName); 133return Task.FromException(new ArgumentException(SR.IO_NotSupported_UnwritableStream, nameof(destination))); 138return Task.FromException(new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, sourceDirectoryName), sourceDirectoryName)); 193throw new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, sourceDirectoryName), sourceDirectoryName); 256return Task.FromException(new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, sourceDirectoryName), sourceDirectoryName)); 307throw new ArgumentException(SR.IO_NotSupported_UnreadableStream, nameof(source)); 312throw new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, destinationDirectoryName), destinationDirectoryName); 375return Task.FromException(new ArgumentException(SR.IO_NotSupported_UnreadableStream, nameof(source))); 380return Task.FromException(new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, destinationDirectoryName), destinationDirectoryName)); 438throw new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, sourceFileName)); 443throw new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, destinationDirectoryName), destinationDirectoryName); 507return Task.FromException(new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, sourceFileName))); 512return Task.FromException(new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, destinationDirectoryName), destinationDirectoryName));
System\Formats\Tar\TarHeader.cs (4)
151throw new ArgumentException(SR.Format(SR.TarExtAttrDisallowedKeyChar, kvp.Key, kvp.Key[index] == '\n' ? "\\n" : kvp.Key[index])); 155throw new ArgumentException(SR.Format(SR.TarExtAttrDisallowedValueChar, kvp.Key, "\\n"));
System\Formats\Tar\TarHeader.Read.cs (32)
140throw new InvalidDataException(SR.Format(SR.TarSizeFieldNegative)); 162throw new InvalidDataException(SR.TarSizeFieldNegative); 241throw new InvalidDataException(SR.Format(SR.TarSizeFieldTooLargeForEntryType, _typeFlag)); 357throw new InvalidDataException(SR.TarInvalidChecksum); 363throw new InvalidDataException(SR.TarSizeFieldNegative); 397TarEntryType.SparseFile => throw new NotSupportedException(SR.Format(SR.TarEntryTypeNotSupported, header._typeFlag)), 479throw new InvalidDataException(SR.Format(SR.TarPosixFormatExpected, _name)); 497throw new InvalidDataException(SR.Format(SR.TarGnuFormatExpected, _name)); 605throw new InvalidOperationException(SR.Format(SR.TarSizeFieldTooLargeForEntryType, _typeFlag.ToString())); 615throw new InvalidDataException(SR.Format(SR.TarDuplicateExtendedAttribute, name)); 621throw new InvalidDataException(SR.ExtHeaderInvalidRecords); 744throw new InvalidDataException(SR.Format(SR.TarCompressionArchiveDetected, "7-Zip")); 751throw new InvalidDataException(SR.Format(SR.TarCompressionArchiveDetected, "ZIP")); 758throw new InvalidDataException(SR.Format(SR.TarCompressionArchiveDetected, "GZIP")); 765throw new InvalidDataException(SR.Format(SR.TarCompressionArchiveDetected, "BZIP2")); 774throw new InvalidDataException(SR.Format(SR.TarCompressionArchiveDetected, "XZ")); 782throw new InvalidDataException(SR.Format(SR.TarCompressionArchiveDetected, "Zstandard")); 802throw new InvalidDataException(SR.Format(SR.TarCompressionArchiveDetected, "ZLIB"));
System\Formats\Tar\TarHeader.Write.cs (16)
377throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(TarEntry.Name)), ArgNameEntry); 398throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(TarEntry.Name)), ArgNameEntry); 451throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(TarEntry.Name)), ArgNameEntry); 497throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(TarEntry.LinkName)), ArgNameEntry); 555throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(PaxTarEntry.UserName)), ArgNameEntry); 573throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(PaxTarEntry.GroupName)), ArgNameEntry); 876throw new ArgumentException(SR.Format(SR.TarFieldTooLargeForEntryFormat, _format)); 901throw new ArgumentException(SR.Format(SR.TarFieldTooLargeForEntryFormat, _format));
System\Formats\Tar\TarHelpers.cs (5)
254throw new InvalidDataException(SR.TarInvalidNumber); 359throw new InvalidDataException(SR.Format(SR.TarInvalidFormat, archiveFormat)); 362throw new ArgumentException(SR.Format(SR.TarEntryTypeNotSupportedInFormat, entryType, archiveFormat), paramName);
System\Formats\Tar\TarReader.cs (7)
38throw new ArgumentException(SR.IO_NotSupported_UnreadableStream, nameof(archiveStream)); 300throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, actualHeader._typeFlag, TarEntryType.ExtendedAttributes)); 327throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, secondHeader._typeFlag, header._typeFlag)); 346throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, thirdHeader._typeFlag, secondHeader._typeFlag));
System\Formats\Tar\TarWriter.cs (6)
95throw new ArgumentException(SR.IO_NotSupported_UnwritableStream); 321_ => throw new InvalidDataException(SR.Format(SR.TarInvalidFormat, Format)), 368throw new IOException(SR.Format(SR.TarStreamSeekabilityUnsupportedCombination, entry.Name)); 378throw new ArgumentException(SR.TarEntryHardLinkOrSymlinkLinkNameEmpty, "entry");
System\Formats\Tar\TarWriter.Unix.cs (4)
59_ => throw new IOException(SR.Format(SR.TarUnsupportedFile, fullPath)), 71_ => throw new InvalidDataException(SR.Format(SR.TarInvalidFormat, Format)),