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