|
Samond Classes Library 1.2.6-STABLE build 219
|
Text file class. More...
#import <SCTextFile.h>
Inheritance diagram for SCTextFile:Instance Properties | |
| NSString * | path |
Creating Text Files | |
| (instancetype) | + textFileWithCoder: |
| (instancetype) | + textFileWithContentsOfSerializedFile: |
| (instancetype) | + textFileWithDataDictionary: |
| (instancetype) | + textFileWithDataDictionaryFromFile: |
| (instancetype) | + textFileWithStream: |
| (instancetype) | + textFileWithFileStream: |
| (instancetype) | + textFileWithData: |
| (instancetype) | + textFileWithContentsOfFile: |
| (instancetype) | + textFileWithContentsOfURL: |
| (instancetype) | + textFileWithContentsOfURLString: |
| (instancetype) | + textFileWithName: |
| (instancetype) | + textFileWithString: |
| (instancetype) | + textFileWithStrings: |
| (instancetype) | + textFileWithCollection: |
| (instancetype) | + textFileWithArray: |
| (instancetype) | + textFileWithText: |
| (instancetype) | + textFileWithTextFile: |
| (instancetype) | + textFileWithName:stream: |
| (instancetype) | + textFileFromStream: |
| (instancetype) | + textFileWithName:path: |
| (instancetype) | + textFileWithPath: |
| (instancetype) | + textFile |
Initializing Text Files | |
| (instancetype) | - initWithTextFile: |
| (instancetype) | - initWithName:stream: |
| (instancetype) | - initFromStream: |
| (instancetype) | - initWithName:path: |
| (instancetype) | - initWithPath: |
Copying Text Files | |
| (void) | - setTextFile: |
Deriving New Text Files | |
| (instancetype) | - textFileByAddingString: |
| (instancetype) | - textFileByAddingCollection: |
| (instancetype) | - textFileByAddingStringsFromArray: |
| (instancetype) | - textFileByAddingArray: |
| (instancetype) | - textFileByAddingStrings: |
| (instancetype) | - textFileByAddingText: |
| (instancetype) | - textFileByAddingTextFile: |
| (instancetype) | - textFileByAddingTextFileWithPath: |
Converting Text Files | |
| SCText * | text |
Reading and Writing Text Files | |
| (BOOL) | - read |
| (BOOL) | - readFromStream: |
| (BOOL) | - readWithPath: |
| (BOOL) | - write |
| (BOOL) | - writeTextToStream: |
| (BOOL) | - writeWithPath: |
| (BOOL) | - reset |
| (BOOL) | - appendToFileWithPath: |
Reading and Writing Texts | |
| (BOOL) | - addTextFromStream: |
| (BOOL) | - addTextWithPath: |
| (BOOL) | - insertTextFromStream:atIndex: |
| (BOOL) | - insertTextWithPath:atIndex: |
| (BOOL) | - replaceTextInRange:withTextFromStream: |
| (BOOL) | - replaceTextInRange:withTextWithPath: |
| (BOOL) | - replaceText:withTextFromStream: |
| (BOOL) | - replaceText:withTextWithPath: |
| (BOOL) | - writeTextInRange:toStream: |
| (BOOL) | - writeTextInRange:withPath: |
| (BOOL) | - appendTextInRange:toFileWithPath: |
| (SCText *) | - cutTextInRange:toStream: |
| (SCText *) | - cutTextInRange:withPath: |
| (SCText *) | - cutAndAppendTextInRange:toFileWithPath: |
| (BOOL) | - writeTextWithSubstring:toStream: |
| (BOOL) | - writeTextWithSubstring:withPath: |
| (BOOL) | - writeTextWithoutSubstring:toStream: |
| (BOOL) | - writeTextWithoutSubstring:withPath: |
Text file class.
Class SCTextFile extends the parent class SCText by adding the methods for reading and writing disk text files.
Class instances can thrown the following exceptions:
| - (BOOL) addTextFromStream: | (SCStream *) | stream |
Adds into the receiving text file the text from the specified input stream.
| stream | - the input stream |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (BOOL) addTextWithPath: | (NSString *) | path |
Adds into the receiving text file the text from the file with the specified path.
| path | - the path to the source file |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (BOOL) appendTextInRange: | (NSRange) | range | |
| toFileWithPath: | (NSString *) | path | |
Appends the text in the specified range to the file with the specified path.
| range | - the range of the appended text |
| path | - the path to the destination file |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (BOOL) appendToFileWithPath: | (NSString *) | path |
Appends the currect content of the receiving text file into the file with the specified path.
| path | - the path to the destination file |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (SCText *) cutAndAppendTextInRange: | (NSRange) | range | |
| toFileWithPath: | (NSString *) | path | |
Cuts the text in the specified range and appends it to the file with the specified path.
| range | - the range of the cut text |
| path | - the path to the destination file |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (SCText *) cutTextInRange: | (NSRange) | range | |
| toStream: | (SCStream *) | stream | |
Cuts the text in the specified range and writes it to the specified stream.
| range | - the range of the cut text |
| stream | - the output stream |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (SCText *) cutTextInRange: | (NSRange) | range | |
| withPath: | (NSString *) | path | |
Cuts the text in the specified range and writes it to the file with the specified path.
| range | - the range of the cut text |
| path | - the path to the destination file |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (instancetype) initFromStream: | (SCStream *) | stream |
Initializes a text file using the specified input stream.
| stream | - the input stream |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (instancetype) initWithName: | (NSString *) | name | |
| path: | (NSString *) | path | |
Initializes a text file using the specified text name and file path.
| name | - the text name |
| path | - the path of the source file |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (instancetype) initWithName: | (NSString *) | name | |
| stream: | (SCStream *) | stream | |
Initializes a text file using the specified text name and input stream.
| name | - the text name |
| stream | - the input stream |
| SCTextException | - text error detected |
| SCStreamException | - stream Метод инициализирует текстовый файл с указанным именем и строками из указанного потока. |
| - (instancetype) initWithPath: | (NSString *) | path |
Initializes a text file using the specified file path.
| path | - the path of the source file |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (instancetype) initWithTextFile: | (SCTextFile *) | textFile |
Initializes a text file using the specified existing text file.
| textFile | - the source text file |
| SCTextException | - text error detected |
Reads the text from the specified input stream and inserts it into the receiving text file at a given index.
| stream | - the input stream |
| index | - the destination index |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (BOOL) insertTextWithPath: | (NSString *) | path | |
| atIndex: | (SCIndex) | index | |
Reads the text from the file with the specified path and inserts it into the receiving text file at a given index.
| path | - the path of the source file |
| index | - the destination index |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (BOOL) read |
Removes the currect content of the receiving text file and reads the text from the text file with the default path.
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (BOOL) readFromStream: | (SCStream *) | stream |
Removes the current content of the receiving text file and reads the text from the specified stream.
| stream | - the input stream |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (BOOL) readWithPath: | (NSString *) | path |
Removes the currect content of the receiving text file and reads the text from the file with the specified file.
| path | - the path to the source file |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
Replaces the all occurrences of the specified text with the text from the specified stream.
| text | - the text to be replaced |
| stream | - the input stream |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (BOOL) replaceText: | (SCStrings *) | text | |
| withTextWithPath: | (NSString *) | path | |
Replaces the all occurrences of the specified text with the text from the file with the specified path.
| text | - the text to be replaced |
| path | - the path of the source file |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (BOOL) replaceTextInRange: | (NSRange) | range | |
| withTextFromStream: | (SCStream *) | stream | |
Replaces the text in the specified range with text loaded from the specified stream.
| range | - the range of the replacing text |
| stream | - the input stream |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (BOOL) replaceTextInRange: | (NSRange) | range | |
| withTextWithPath: | (NSString *) | path | |
Replaces the text in the specified range with text loaded from the file with the specified path.
| range | - the range of the replacing text |
| path | - the path to the source file |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (BOOL) reset |
Discards all receiving text changes and reloads content from the file with the default path.
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (void) setTextFile: | (SCTextFile *) | textFile |
Replaces the content and settings of the receiving text file by the content and settings of the specified text file.
| textFile | - the source text file |
| SCTextException | - text error detected |
| + (instancetype) textFile |
Returns an unnamed empty text file created by using the default settings.
| - (instancetype) textFileByAddingArray: | (SCArray *) | array |
Returns the new text file that contains strings from the receiving text file and a given array.
| array | - the array of strings to add to the new text file |
| SCTextException | - text error detected |
| SCCollectionException | - collection error detected |
| - (instancetype) textFileByAddingCollection: | (id<SCCollection>) | collection |
Returns the new text file that contains strings from the receiving text file and a given collection of any supported type.
| collection | - the collection of strings to add to the new text file |
| SCTextException | - text error detected |
| SCCollectionException | - collection error detected |
| - (instancetype) textFileByAddingString: | (NSString *) | string |
Returns the new text file that contains strings from the receiving text file and a given string.
| string | - the string to add to the new text file |
| SCTextException | - text error detected |
| - (instancetype) textFileByAddingStrings: | (SCStrings *) | strings |
Returns the new text file that contains strings from the receiving text file and a given list.
| strings | - the list of strings to add to the new text file |
| SCTextException | - text error detected |
| - (instancetype) textFileByAddingStringsFromArray: | (SCArray *) | array |
Returns the new text file that contains strings from the receiving text file and a given array.
| array | - the array of strings to add to the new text file |
| SCTextException | - text error detected |
| SCCollectionException | - collection error detected |
| - (instancetype) textFileByAddingText: | (SCText *) | text |
Returns the new text file that contains strings from the receiving text file and a given text.
| text | - the text to add to the new text file |
| SCTextException | - text error detected |
| - (instancetype) textFileByAddingTextFile: | (SCTextFile *) | textFile |
Returns the new text file that contains strings from the receiving text file and a given another text file.
| textFile | - the text file to add to the new text file |
| SCTextException | - text error detected |
| - (instancetype) textFileByAddingTextFileWithPath: | (NSString *) | path |
Returns the new text file that contains strings from the receiving text file and a text file with a given path.
| path | - the path to the text file to add to the new text file |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| + (instancetype) textFileFromStream: | (SCStream *) | stream |
Returns a text file created by using the specified input stream.
| stream | - the input stream |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| + (instancetype) textFileWithArray: | (SCArray *) | array |
Returns a text file created by using strings from a given array.
| array | - the array with strings to add to the new text file |
| SCTextException | - text error detected |
| SCCollectionException | - collection error detected |
| + (instancetype) textFileWithCoder: | (NSCoder *) | coder |
Returns a text file created by using the specified coder.
| coder | - the source coder |
| + (instancetype) textFileWithCollection: | (id<SCCollection>) | collection |
Returns a text file created by using the strings from the specified existing collection of any supported type.
| collection | - the collection with the source strings |
| SCTextException | - text error detected |
| SCCollectionException | - collection error detected |
| + (instancetype) textFileWithContentsOfFile: | (NSString *) | path |
Returns a text file created by using the file with the specified path.
| path | - the path to the source file |
| + (instancetype) textFileWithContentsOfSerializedFile: | (NSString *) | path |
Returns a text file created by using the content of the serialized file with the specified path.
| path | - the path to the source serialized file |
| + (instancetype) textFileWithContentsOfURL: | (NSURL *) | url |
Returns a text file created by using the specified URL.
| url | - the source URL |
| + (instancetype) textFileWithContentsOfURLString: | (NSString *) | urlString |
Returns a text file created by using the data from the URL with the specified string.
| urlString | - the string of the source URL |
| + (instancetype) textFileWithData: | (NSData *) | data |
Returns a text file created by using the specified data object.
| data | - the source data object |
| + (instancetype) textFileWithDataDictionary: | (NSDictionary *) | dictionary |
Returns a text file created by using the specified data dictionary.
| dictionary | - the source dictionary |
| + (instancetype) textFileWithDataDictionaryFromFile: | (NSString *) | path |
Returns a text file created by using the data dictionary from the specified file.
| path | - the path to the source data dictionary file |
| + (instancetype) textFileWithFileStream: | (NSString *) | path |
Returns a text file created by using the data from the file stream with the specified path.
| path | - the path to the stream file |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| + (instancetype) textFileWithName: | (NSString *) | name |
Returns a text file created by using the specified text name.
| name | - the text name |
| + (instancetype) textFileWithName: | (NSString *) | name | |
| path: | (NSString *) | path | |
Returns a text file created by using the specified text name and file path.
| name | - the text name |
| path | - the path of the source file |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| + (instancetype) textFileWithName: | (NSString *) | name | |
| stream: | (SCStream *) | stream | |
Returns a text file created by using the specified text name and input stream.
| name | - the text name |
| stream | - the input stream |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| + (instancetype) textFileWithPath: | (NSString *) | path |
Returns a text file created by using the specified file path.
| path | - the path of the source file |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| + (instancetype) textFileWithStream: | (SCStream *) | stream |
Returns a text file created by using the data from the specified stream.
| stream | - the source stream |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| + (instancetype) textFileWithString: | (NSString *) | string |
Returns a text file created by using the specified existing string.
| string | - the source string |
| SCTextException | - text error detected |
| + (instancetype) textFileWithStrings: | (SCStrings *) | strings |
Returns a text file created by using the specified existing strings list.
| strings | - the source strings list |
| SCTextException | - text error detected |
| + (instancetype) textFileWithText: | (SCText *) | text |
Returns a text file created by using the specified existing text.
| text | - the source text |
| SCTextException | - text error detected |
| + (instancetype) textFileWithTextFile: | (SCTextFile *) | textFile |
Returns a text file created by using the specified existing text file.
| textFile | - the source text file |
| SCTextException | - text error detected |
| - (BOOL) write |
Writes the content of the receiving text file into the file with the default path.
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (BOOL) writeTextInRange: | (NSRange) | range | |
| toStream: | (SCStream *) | stream | |
Writes the text in the specified range to the specified stream.
| range | - the range of the writed text |
| stream | - the output stream |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (BOOL) writeTextInRange: | (NSRange) | range | |
| withPath: | (NSString *) | path | |
Writes the text in the specified range to the file with the specified path.
| range | - the range of the writed text |
| path | - the path of the destination file |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (BOOL) writeTextToStream: | (SCStream *) | stream |
Writes the content of the receiving text file into the specified output stream.
| stream | - the output stream |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (BOOL) writeTextWithoutSubstring: | (NSString *) | substring | |
| toStream: | (SCStream *) | stream | |
Writes into the specified stream strings from the receiving text file that does not contain a given substring.
| substring | - the required substring |
| stream | - the output stream |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (BOOL) writeTextWithoutSubstring: | (NSString *) | substring | |
| withPath: | (NSString *) | path | |
Writes into the file with the specified path the strings from the receiving text file that does not contain a given substring.
| substring | - the required substring |
| path | - the path of the destination file |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (BOOL) writeTextWithSubstring: | (NSString *) | substring | |
| toStream: | (SCStream *) | stream | |
Writes into the specified stream strings from the receiving text file that contain a given substring.
| substring | - the required substring |
| stream | - the output stream |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (BOOL) writeTextWithSubstring: | (NSString *) | substring | |
| withPath: | (NSString *) | path | |
Writes into the file with the specified path strings from the receiving text file that contain a given substring.
| substring | - the required substring |
| path | - the path to the destination file |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
| - (BOOL) writeWithPath: | (NSString *) | path |
Writes the content of the receiving text file into the file with the specified path.
| path | - the path to the destination file |
| SCTextException | - text error detected |
| SCStreamException | - stream error detected |
| SCSystemException | - system error detected |
|
readnonatomicretain |
Contains the path to the text file.
|
readnonatomicassign |
Returns the text with the copy of all receiving text file strings
1.8.9.1