Samond Classes Library 1.2.6-STABLE build 219
List of all members
SCTextFile Class Reference

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

SCTexttext
 

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:
 

Additional Inherited Members

- Instance Methods inherited from SCText
(instancetype) - initWithText:
 
(void) - setText:
 
(BOOL) - isEqualToText:
 
(instancetype) - textByAddingString:
 
(instancetype) - textByAddingCollection:
 
(instancetype) - textByAddingStringsFromArray:
 
(instancetype) - textByAddingArray:
 
(instancetype) - textByAddingStrings:
 
(instancetype) - textByAddingText:
 
(void) - addText:
 
(void) - insertText:atIndex:
 
(void) - removeAllText
 
(void) - removeTextInRange:
 
(void) - removeTextWithSubstring:
 
(void) - removeTextWithoutSubstring:
 
(void) - removeSubstring:
 
(SCText *) - cutTextInRange:
 
(void) - removeText:
 
(void) - replaceTextInRange:withText:
 
(void) - replaceTextInRange:withCollection:
 
(void) - replaceText:withText:
 
(void) - exchangeTextInRange:withTextInRange:
 
(void) - duplicateTextInRange:
 
(void) - duplicateStringsInRange:
 
(void) - copyTextInRange:toIndex:
 
(void) - moveTextInRange:toIndex:
 
(void) - forwardMoveTextInRange:steps:
 
(void) - forwardMoveTextInRange:
 
(void) - backwardMoveTextInRange:steps:
 
(void) - backwardMoveTextInRange:
 
(void) - moveToFirstPositionTextInRange:
 
(void) - moveToLastPositionTextInRange:
 
(SCText *) - textInRange:
 
(BOOL) - containsText:
 
(NSRange) - rangeOfText:
 
(NSRange) - rangeOfCollection:
 
(SCIndex- indexOfText:
 
(SCIndex- indexOfCollection:
 
(SCUInteger- countOfText:
 
(SCUInteger- countOfCollection:
 
(SCArray *) - indexesOfText:
 
(SCArray *) - indexesOfCollection:
 
(SCText *) - textWithSubstring:
 
(SCText *) - textWithoutSubstring:
 
(SCTextIndex *) - textIndexOfSubstring:
 
(SCArray *) - textIndexesOfSubstring:
 
- Instance Methods inherited from SCStrings
(instancetype) - initWithName:
 
(instancetype) - initWithString:
 
(instancetype) - initWithCollection:
 
(instancetype) - initWithArray:
 
(instancetype) - initWithStrings:
 
(instancetype) - init
 
(void) - setStrings:
 
(void) - setCollection:
 
(void) - setString:
 
(BOOL) - isEqualToStrings:
 
(BOOL) - isEqualToCollection:
 
(BOOL) - isEqualTo:
 
(BOOL) - isEqual:
 
(instancetype) - stringsByAddingString:
 
(instancetype) - stringsByAddingCollection:
 
(instancetype) - stringsByAddingStrings:
 
(instancetype) - stringsByAddingStringsFromArray:
 
(instancetype) - stringsByAddingArray:
 
(void) - enumerateWithDelegate:
 
(void) - enumerate
 
(void) - reverseEnumerateWithDelegate:
 
(void) - reverseEnumerate
 
(NSUInteger) - countByEnumeratingWithState:objects:count:
 
(void) - sortAscendingWithSorter:
 
(void) - sortDescendingWithSorter:
 
(void) - sortWithSorter:
 
(void) - sortAscending
 
(void) - sortDescending
 
(void) - sort
 
(SCStrings *) - ascendingSortedStringsWithSorter:
 
(SCStrings *) - descendingSortedStringsWithSorter:
 
(SCStrings *) - sortedStringsWithSorter:
 
(void) - addString:
 
(void) - addCollection:
 
(void) - addStrings:
 
(void) - addLine
 
(void) - addStringsFromArray:
 
(void) - addArray:
 
(void) - insertString:atIndex:
 
(void) - insertStrings:atIndex:
 
(void) - insertCollection:atIndex:
 
(void) - insertStrings:atIndexes:
 
(void) - insertCollection:atIndexes:
 
(void) - insertLineAtIndex:
 
(void) - removeAllStrings
 
(void) - removeFirstString
 
(void) - removeLastString
 
(void) - removeStringAtIndex:
 
(void) - removeStringsAtIndexes:
 
(void) - removeString:
 
(void) - removeStrings:
 
(void) - removeCollection:
 
(void) - removeStringsWithSubstring:
 
(void) - removeStringsNotAtIndexes:
 
(void) - removeStringsNotEqualTo:
 
(void) - removeStringsNotInStrings:
 
(void) - removeStringsNotInCollection:
 
(void) - removeStringsWithoutSubstring:
 
(void) - removeDuplicatedStrings
 
(void) - replaceStringAtIndex:withString:
 
(void) - replaceStringsAtIndexes:withStrings:
 
(void) - replaceStringsAtIndexes:withCollection:
 
(void) - replaceString:withString:
 
(void) - setObject:atIndexedSubscript:
 
(void) - exchangeStringAtIndex:withStringAtIndex:
 
(void) - duplicateStringAtIndex:
 
(void) - duplicateAllStrings
 
(void) - duplicate
 
(void) - copyStringAtIndex:toIndex:
 
(void) - moveStringAtIndex:toIndex:
 
(void) - forwardMoveStringAtIndex:steps:
 
(void) - forwardMoveStringAtIndex:
 
(void) - backwardMoveStringAtIndex:steps:
 
(void) - backwardMoveStringAtIndex:
 
(void) - moveToFirstPositionStringAtIndex:
 
(void) - moveToLastPositionStringAtIndex:
 
(void) - reverse
 
(NSString *) - stringAtIndex:
 
(SCStrings *) - stringsAtIndexes:
 
(id) - objectAtIndexedSubscript:
 
(BOOL) - containsString:
 
(BOOL) - containsStrings:
 
(BOOL) - containsCollection:
 
(BOOL) - containsAnyString:
 
(BOOL) - containsAnyStringFromCollection:
 
(BOOL) - containsSubstring:
 
(BOOL) - containsSubstrings:
 
(BOOL) - containsSubstringsFromCollection:
 
(BOOL) - containsAnySubstring:
 
(BOOL) - containsAnySubstringFromCollection:
 
(BOOL) - containsDuplicatedStrings
 
(SCIndex- indexOfString:
 
(SCIndex- indexOfSubstring:
 
(SCStrings *) - stringsWithSubstring:
 
(SCStrings *) - stringsWithSubstrings:
 
(SCStrings *) - stringsWithSubstringsFromCollection:
 
(SCStrings *) - stringsWithAnySubstring:
 
(SCStrings *) - stringsWithAnySubstringFromCollection:
 
(SCStrings *) - stringsWithoutSubstring:
 
(SCStrings *) - stringsWithoutSubstrings:
 
(SCStrings *) - stringsWithoutSubstringsFromCollection:
 
(SCULong- countOfString:
 
(SCULong- countOfSubstring:
 
(SCULong- countOfStringsWithSubstring:
 
- Instance Methods inherited from SCObject
(instancetype) - initWithContentsOfSerializedFile:
 
(BOOL) - writeContentsToSerializedFile:
 
(instancetype) - initWithDataDictionaryFromFile:
 
(void) - writeToDataDictionaryFile:atomically:
 
(void) - writeToDataDictionaryFile:
 
(NSDictionary *) - dataDictionary
 
(instancetype) - initWithFileStream:
 
(void) - writeToFileStream:
 
(void) - appendToFileStream:
 
(instancetype) - initWithData:
 
(instancetype) - initWithContentsOfFile:
 
(instancetype) - initWithContentsOfURL:
 
(instancetype) - initWithContentsOfURLString:
 
(BOOL) - writeToFile:
 
(BOOL) - writeToURL:
 
(BOOL) - writeToURLString:
 
(NSData *) - data
 
- Class Methods inherited from SCText
(instancetype) + textWithCoder:
 
(instancetype) + textWithContentsOfSerializedFile:
 
(instancetype) + textWithDataDictionary:
 
(instancetype) + textWithDataDictionaryFromFile:
 
(instancetype) + textWithStream:
 
(instancetype) + textWithFileStream:
 
(instancetype) + textWithData:
 
(instancetype) + textWithContentsOfFile:
 
(instancetype) + textWithContentsOfURL:
 
(instancetype) + textWithContentsOfURLString:
 
(instancetype) + textWithName:
 
(instancetype) + textWithString:
 
(instancetype) + textWithStrings:
 
(instancetype) + textWithCollection:
 
(instancetype) + textWithArray:
 
(instancetype) + textWithText:
 
(instancetype) + text
 
- Class Methods inherited from SCStrings
(instancetype) + stringsWithCoder:
 
(instancetype) + stringsWithContentsOfSerializedFile:
 
(instancetype) + stringsWithDataDictionary:
 
(instancetype) + stringsWithDataDictionaryFromFile:
 
(instancetype) + stringsWithStream:
 
(instancetype) + stringsWithFileStream:
 
(instancetype) + stringsWithData:
 
(instancetype) + stringsWithContentsOfFile:
 
(instancetype) + stringsWithContentsOfURL:
 
(instancetype) + stringsWithContentsOfURLString:
 
(instancetype) + stringsWithName:
 
(instancetype) + stringsWithString:
 
(instancetype) + stringsWithCollection:
 
(instancetype) + stringsWithArray:
 
(instancetype) + stringsWithStrings:
 
(instancetype) + strings
 
- Properties inherited from SCText
SCStringsstrings
 
SCUniqueStringsuniqueStrings
 
- Properties inherited from SCStrings
NSString * name
 
SCIndex count
 
BOOL readOnly
 
BOOL empty
 
BOOL modified
 
BOOL caseInsensitive
 
id< SCTextDelegatedelegate
 
NSEnumerator * stringEnumerator
 
NSEnumerator * reverseStringEnumerator
 
SCArrayarray
 
NSArray * foundationArray
 
SCStringsascendingSortedStrings
 
SCStringsdescendingSortedStrings
 
SCStringssortedStrings
 
SCStringsreversedStrings
 
NSString * firstString
 
NSString * lastString
 
SCIndex indexOfLastString
 
- Properties inherited from SCObject
NSString * className
 

Detailed Description

Text file class.

SDK
macOS 10.6+, iOS 7.0+, GNUstep
Since
version 1.1.4

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:

Method Documentation

- (BOOL) addTextFromStream: (SCStream *)  stream

Adds into the receiving text file the text from the specified input stream.

Parameters
stream- the input stream
Returns
YES if the reading operation is successfully, otherwise NO
Exceptions
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.

Parameters
path- the path to the source file
Returns
YES if the reading operation is successfully, otherwise NO
Exceptions
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.

Parameters
range- the range of the appended text
path- the path to the destination file
Returns
YES if the writing operation is successfully, otherwise NO
Exceptions
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.

Parameters
path- the path to the destination file
Returns
YES if the writing operation is successfully, otherwise NO
Exceptions
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.

Parameters
range- the range of the cut text
path- the path to the destination file
Returns
A text with strings in the specified range
Exceptions
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.

Parameters
range- the range of the cut text
stream- the output stream
Returns
A text with strings in the specified range
Exceptions
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.

Parameters
range- the range of the cut text
path- the path to the destination file
Returns
A text with strings in the specified range
Exceptions
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.

Parameters
stream- the input stream
Returns
A newly initialized text file
Exceptions
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.

Parameters
name- the text name
path- the path of the source file
Returns
A newly initialized text file
Exceptions
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.

Parameters
name- the text name
stream- the input stream
Returns
A newly initialized text file
Exceptions
SCTextException- text error detected
SCStreamException- stream Метод инициализирует текстовый файл с указанным именем и строками из указанного потока.
- (instancetype) initWithPath: (NSString *)  path

Initializes a text file using the specified file path.

Parameters
path- the path of the source file
Returns
A newly initialized text file
Exceptions
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.

Parameters
textFile- the source text file
Returns
A newly initialized text file
Exceptions
SCTextException- text error detected
- (BOOL) insertTextFromStream: (SCStream *)  stream
atIndex: (SCIndex index 

Reads the text from the specified input stream and inserts it into the receiving text file at a given index.

Parameters
stream- the input stream
index- the destination index
Returns
YES if the reading operation is successfully, otherwise NO
Exceptions
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.

Parameters
path- the path of the source file
index- the destination index
Returns
YES if the reading operation is successfully, otherwise NO
Exceptions
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.

Returns
YES if the reading operation is successfully, otherwise NO
Exceptions
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.

Parameters
stream- the input stream
Returns
YES if the reading operation is successfully, otherwise NO
Exceptions
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.

Parameters
path- the path to the source file
Returns
YES if the reading operation is successfully, otherwise NO
Exceptions
SCTextException- text error detected
SCStreamException- stream error detected
SCSystemException- system error detected
- (BOOL) replaceText: (SCStrings *)  text
withTextFromStream: (SCStream *)  stream 

Replaces the all occurrences of the specified text with the text from the specified stream.

Parameters
text- the text to be replaced
stream- the input stream
Returns
YES if the reading operation is successfully, otherwise NO
Exceptions
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.

Parameters
text- the text to be replaced
path- the path of the source file
Returns
YES if the reading operation is successfully, otherwise NO
Exceptions
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.

Parameters
range- the range of the replacing text
stream- the input stream
Returns
YES if the reading operation is successfully, otherwise NO
Exceptions
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.

Parameters
range- the range of the replacing text
path- the path to the source file
Returns
YES if the reading operation is successfully, otherwise NO
Exceptions
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.

Returns
YES if the operation is successfully, otherwise NO
Exceptions
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.

Parameters
textFile- the source text file
Exceptions
SCTextException- text error detected
+ (instancetype) textFile

Returns an unnamed empty text file created by using the default settings.

Returns
A created text file
- (instancetype) textFileByAddingArray: (SCArray *)  array

Returns the new text file that contains strings from the receiving text file and a given array.

Parameters
array- the array of strings to add to the new text file
Returns
A new text file with strings from the receiving text file and a specified array
Exceptions
SCTextException- text error detected
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- textFileByAddingStringsFromArray:
- (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.

Parameters
collection- the collection of strings to add to the new text file
Returns
A new text file with strings from the receiving text file and a specified collection
Exceptions
SCTextException- text error detected
SCCollectionException- collection error detected
Since
version 1.2.3
- (instancetype) textFileByAddingString: (NSString *)  string

Returns the new text file that contains strings from the receiving text file and a given string.

Parameters
string- the string to add to the new text file
Returns
A new text with strings from the receiving text file and a specified string
Exceptions
SCTextException- text error detected
Since
version 1.2.3
- (instancetype) textFileByAddingStrings: (SCStrings *)  strings

Returns the new text file that contains strings from the receiving text file and a given list.

Parameters
strings- the list of strings to add to the new text file
Returns
A new text file with strings from the receiving text file and a specified list
Exceptions
SCTextException- text error detected
Since
version 1.2.3
- (instancetype) textFileByAddingStringsFromArray: (SCArray *)  array

Returns the new text file that contains strings from the receiving text file and a given array.

Parameters
array- the array of strings to add to the new text file
Returns
A new text file with strings from the receiving text file and a specified array
Exceptions
SCTextException- text error detected
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- textFileByAddingArray:
- (instancetype) textFileByAddingText: (SCText *)  text

Returns the new text file that contains strings from the receiving text file and a given text.

Parameters
text- the text to add to the new text file
Returns
A new text file with strings from the receiving text file and a specified text
Exceptions
SCTextException- text error detected
Since
version 1.2.3
- (instancetype) textFileByAddingTextFile: (SCTextFile *)  textFile

Returns the new text file that contains strings from the receiving text file and a given another text file.

Parameters
textFile- the text file to add to the new text file
Returns
A new text file with strings from the receiving text file and a specified text file
Exceptions
SCTextException- text error detected
Since
version 1.2.3
- (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.

Parameters
path- the path to the text file to add to the new text file
Returns
A new text file with strings from the receiving text file and a text file with the specified path
Exceptions
SCTextException- text error detected
SCStreamException- stream error detected
SCSystemException- system error detected
Since
version 1.2.3
+ (instancetype) textFileFromStream: (SCStream *)  stream

Returns a text file created by using the specified input stream.

Parameters
stream- the input stream
Returns
A created text file
Exceptions
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.

Parameters
array- the array with strings to add to the new text file
Returns
A created text file
Exceptions
SCTextException- text error detected
SCCollectionException- collection error detected
Since
version 1.2.3
+ (instancetype) textFileWithCoder: (NSCoder *)  coder

Returns a text file created by using the specified coder.

Parameters
coder- the source coder
Returns
A created text file
+ (instancetype) textFileWithCollection: (id<SCCollection>)  collection

Returns a text file created by using the strings from the specified existing collection of any supported type.

Parameters
collection- the collection with the source strings
Returns
A created text file
Exceptions
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.

Parameters
path- the path to the source file
Returns
A created text file
+ (instancetype) textFileWithContentsOfSerializedFile: (NSString *)  path

Returns a text file created by using the content of the serialized file with the specified path.

Parameters
path- the path to the source serialized file
Returns
A created text file
+ (instancetype) textFileWithContentsOfURL: (NSURL *)  url

Returns a text file created by using the specified URL.

Parameters
url- the source URL
Returns
A created text file
+ (instancetype) textFileWithContentsOfURLString: (NSString *)  urlString

Returns a text file created by using the data from the URL with the specified string.

Parameters
urlString- the string of the source URL
Returns
A created text file
+ (instancetype) textFileWithData: (NSData *)  data

Returns a text file created by using the specified data object.

Parameters
data- the source data object
Returns
A created text file
+ (instancetype) textFileWithDataDictionary: (NSDictionary *)  dictionary

Returns a text file created by using the specified data dictionary.

Parameters
dictionary- the source dictionary
Returns
A created text file
+ (instancetype) textFileWithDataDictionaryFromFile: (NSString *)  path

Returns a text file created by using the data dictionary from the specified file.

Parameters
path- the path to the source data dictionary file
Returns
A created text file
+ (instancetype) textFileWithFileStream: (NSString *)  path

Returns a text file created by using the data from the file stream with the specified path.

Parameters
path- the path to the stream file
Returns
A created text file
Exceptions
SCStreamException- stream error detected
SCSystemException- system error detected
+ (instancetype) textFileWithName: (NSString *)  name

Returns a text file created by using the specified text name.

Parameters
name- the text name
Returns
A created text file
+ (instancetype) textFileWithName: (NSString *)  name
path: (NSString *)  path 

Returns a text file created by using the specified text name and file path.

Parameters
name- the text name
path- the path of the source file
Returns
A created text file
Exceptions
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.

Parameters
name- the text name
stream- the input stream
Returns
A created text file
Exceptions
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.

Parameters
path- the path of the source file
Returns
A created text file
Exceptions
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.

Parameters
stream- the source stream
Returns
A created text file
Exceptions
SCStreamException- stream error detected
SCSystemException- system error detected
+ (instancetype) textFileWithString: (NSString *)  string

Returns a text file created by using the specified existing string.

Parameters
string- the source string
Returns
A created text file
Exceptions
SCTextException- text error detected
+ (instancetype) textFileWithStrings: (SCStrings *)  strings

Returns a text file created by using the specified existing strings list.

Parameters
strings- the source strings list
Returns
A created text file
Exceptions
SCTextException- text error detected
+ (instancetype) textFileWithText: (SCText *)  text

Returns a text file created by using the specified existing text.

Parameters
text- the source text
Returns
A created text file
Exceptions
SCTextException- text error detected
+ (instancetype) textFileWithTextFile: (SCTextFile *)  textFile

Returns a text file created by using the specified existing text file.

Parameters
textFile- the source text file
Returns
A created text file
Exceptions
SCTextException- text error detected
- (BOOL) write

Writes the content of the receiving text file into the file with the default path.

Returns
YES if the writing operation is successfully, otherwise NO
Exceptions
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.

Parameters
range- the range of the writed text
stream- the output stream
Returns
YES if the writing operation is successfully, otherwise NO
Exceptions
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.

Parameters
range- the range of the writed text
path- the path of the destination file
Returns
YES if the writing operation is successfully, otherwise NO
Exceptions
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.

Parameters
stream- the output stream
Returns
YES if the writing operation is successfully, otherwise NO
Exceptions
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.

Parameters
substring- the required substring
stream- the output stream
Returns
YES if the writing operation is successfully, otherwise NO
Exceptions
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.

Parameters
substring- the required substring
path- the path of the destination file
Returns
YES if the writing operation is successfully, otherwise NO
Exceptions
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.

Parameters
substring- the required substring
stream- the output stream
Returns
YES if the writing operation is successfully, otherwise NO
Exceptions
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.

Parameters
substring- the required substring
path- the path to the destination file
Returns
YES if the writing operation is successfully, otherwise NO
Exceptions
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.

Parameters
path- the path to the destination file
Returns
YES if the writing operation is successfully, otherwise NO
Exceptions
SCTextException- text error detected
SCStreamException- stream error detected
SCSystemException- system error detected

Property Documentation

- (NSString*) path
readnonatomicretain

Contains the path to the text file.

- (SCText *) text
readnonatomicassign

Returns the text with the copy of all receiving text file strings


The documentation for this class was generated from the following files: