TiFile Class Reference
Inherits from | TiProxy : NSObject |
Declared in | TiFile.h |
Overview
The main interface for File-based proxies — this is in the API since Filesystem implements it but we want to be able to have other modules be able to cast to it transparently (such as database) but without causing a compile-time dependency on Filesystem module.
Tasks
-
path
Returns absolute path of the file on file system.
property -
size
Returns size of the file on file.
property -
– initWithPath:
Creates new instance of TiFile with specified path.
-
– initWithTempFilePath:
Creates new instance of TiFile for a temporary file with specified path.
-
+ createTempFile:
Creates a new instance of TiFile for a temporary file created with specified extension in the default temporary folder.
-
– blob
Returns the contents of the file as a TiBlob.
Properties
Instance Methods
blob
Returns the contents of the file as a TiBlob.
- (id)blob
Return Value
The TiBlob object.
Declared In
TiFile.h
initWithPath:
Creates new instance of TiFile with specified path.
- (id)initWithPath:(NSString *)path
Parameters
- path
The absolute path.
Return Value
A created instance of TiFile.
Declared In
TiFile.h
initWithTempFilePath:
Creates new instance of TiFile for a temporary file with specified path.
- (id)initWithTempFilePath:(NSString *)path
Parameters
- path
The absolute path.
Return Value
A created instance of TiFile.
Discussion
The references file will be deleted on file system when the TiFile object is released.
Declared In
TiFile.h