Main   GitHub

Methods | List of all members
ZipObject Class Reference

Inherits SimObject, and SimObject.

Methods

bool addFile (filename, pathInZip[, replace=true])
 
bool addFile (filename, pathInZip[, replace=true])
 
void closeArchive ()
 
void closeArchive ()
 
void closeFile (stream)
 
void closeFile (stream)
 
bool deleteFile (pathInZip)
 
bool deleteFile (pathInZip)
 
bool extractFile (pathInZip, filename)
 
bool extractFile (pathInZip, filename)
 
string getFileEntry (index)
 
string getFileEntry (index)
 
int getFileEntryCount ()
 
int getFileEntryCount ()
 
bool openArchive (filename,[accessMode=Read])
 
bool openArchive (filename,[accessMode=Read])
 
int openFileForRead (filename)
 
int openFileForRead (filename)
 
int openFileForWrite (filename)
 
int openFileForWrite (filename)
 
- Methods inherited from SimObject
void addFieldFilter (fieldName)
 
void addFieldFilter (fieldName)
 
string call (%args)
 
string call (%args)
 
int clone ([bool copyDynamicFields?=false])
 
int clone ([bool copyDynamicFields?=false])
 
void delete ()
 
void delete ()
 
void dump ()
 
void dump ()
 
void dumpClassHierarchy ()
 
void dumpClassHierarchy ()
 
string getClassName ()
 
string getClassName ()
 
string getClassNamespace ()
 
string getClassNamespace ()
 
string getDynamicField (index)
 
string getDynamicField (index)
 
int getDynamicFieldCount ()
 
int getDynamicFieldCount ()
 
string getField (int index)
 
string getField (int index)
 
int getFieldCount ()
 
int getFieldCount ()
 
string getFieldType (fieldName)
 
string getFieldType (fieldName)
 
string getFieldValue (fieldName)
 
string getFieldValue (fieldName)
 
int getGroup ()
 
int getGroup ()
 
int getId ()
 
int getId ()
 
string getInternalName ()
 
string getInternalName ()
 
string getName ()
 
string getName ()
 
string getProgenitorFile ()
 
string getProgenitorFile ()
 
string getSuperClassNamespace ()
 
string getSuperClassNamespace ()
 
int getType ()
 
int getType ()
 
bool isChildOfGroup ()
 
bool isChildOfGroup ()
 
bool isMemberOfClass (string classname)
 
bool isMemberOfClass (string classname)
 
bool isMethod (string method name)
 
bool isMethod (string method name)
 
bool isTimerActive ()
 
bool isTimerActive ()
 
void removeFieldFilter (fieldName)
 
void removeFieldFilter (fieldName)
 
bool save (fileName,[selectedOnly])
 
bool save (fileName,[selectedOnly])
 
int schedule (time, command,< arg1...argN >)
 
int schedule (time, command,< arg1...argN >)
 
void setClassNamespace ()
 
void setClassNamespace ()
 
bool setFieldValue (fieldName, value)
 
bool setFieldValue (fieldName, value)
 
void setInternalName ()
 
void setInternalName ()
 
void setName (newName)
 
void setName (newName)
 
void setProgenitorFile (file)
 
void setProgenitorFile (file)
 
void setSuperClassNamespace ()
 
void setSuperClassNamespace ()
 
bool startTimer (callbackFunction, float timePeriod,[repeat])
 
bool startTimer (callbackFunction, float timePeriod,[repeat])
 
void stopTimer ()
 
void stopTimer ()
 

Fields

SimBase
bool canSaveDynamicFields
 
string internalName
 
SimObjectPtr parentGroup
 
Namespace Linking
string superclass
 
string class
 
- Fields inherited from SimObject
bool canSaveDynamicFields
 
string internalName
 
SimObjectPtr parentGroup
 
string superclass
 
string class
 

Methods

bool ZipObject::addFile ( filename  ,
pathInZip  [, replace=true] 
)

Add a file to the zip

Parameters
filenameThe name of the file
pathInZipThe internal (to the zip) path to the file
replaceSet whether to replace the file if one already exists with the name in the path (default true)
Returns
Returns true on success and false otherwise
bool ZipObject::addFile ( filename  ,
pathInZip  [, replace=true] 
)

Add a file to the zip

Parameters
filenameThe name of the file
pathInZipThe internal (to the zip) path to the file
replaceSet whether to replace the file if one already exists with the name in the path (default true)
Returns
Returns true on success and false otherwise
void ZipObject::closeArchive ( )

Close the zip file

Returns
No return value.
void ZipObject::closeArchive ( )

Close the zip file

Returns
No return value.
void ZipObject::closeFile ( stream  )

Close a file within the zip

Parameters
streamThe file stream ID
Returns
No return value.
void ZipObject::closeFile ( stream  )

Close a file within the zip

Parameters
streamThe file stream ID
Returns
No return value.
bool ZipObject::deleteFile ( pathInZip  )

Delete a file from the zip

Parameters
pathInZipThe full internal path of the file
Returns
Returns true on success and false otherwise.
bool ZipObject::deleteFile ( pathInZip  )

Delete a file from the zip

Parameters
pathInZipThe full internal path of the file
Returns
Returns true on success and false otherwise.
bool ZipObject::extractFile ( pathInZip  ,
filename   
)

Extract a file from the zip

Parameters
pathInZipThe internal path of the desired file
filenameThe file's name
Returns
Returns true on success and false otherwise
bool ZipObject::extractFile ( pathInZip  ,
filename   
)

Extract a file from the zip

Parameters
pathInZipThe internal path of the desired file
filenameThe file's name
Returns
Returns true on success and false otherwise
string ZipObject::getFileEntry ( index  )

Get file entry.

Parameters
indexIndex to file entry
Returns
Returns tab separated string containing filename, uncompressed size, compressed size, compression method and CRC32
string ZipObject::getFileEntry ( index  )

Get file entry.

Parameters
indexIndex to file entry
Returns
Returns tab separated string containing filename, uncompressed size, compressed size, compression method and CRC32
int ZipObject::getFileEntryCount ( )

Get number of files in the zip

Returns
Returns the number of files found in zip
int ZipObject::getFileEntryCount ( )

Get number of files in the zip

Returns
Returns the number of files found in zip
bool ZipObject::openArchive ( filename  )

Open a zip file

Parameters
filenameThe file's name
accessModeThe mode in which to open the file (default Read)
Returns
Returns true on success, false otherwise
See Also
closeArchive, openFileForRead, openFileForWrite, closeFile
bool ZipObject::openArchive ( filename  )

Open a zip file

Parameters
filenameThe file's name
accessModeThe mode in which to open the file (default Read)
Returns
Returns true on success, false otherwise
See Also
closeArchive, openFileForRead, openFileForWrite, closeFile
int ZipObject::openFileForRead ( filename  )

Open a file within the zip for reading

Parameters
filenameThe file's name to open in current zip file
Returns
The file stream ID as an integer or zero on failure.
int ZipObject::openFileForRead ( filename  )

Open a file within the zip for reading

Parameters
filenameThe file's name to open in current zip file
Returns
The file stream ID as an integer or zero on failure.
int ZipObject::openFileForWrite ( filename  )

Open a file within the zip for writing

Parameters
filenameThe file's name to open in current zip file
Returns
The file stream ID as an integer or 0 on failure.
int ZipObject::openFileForWrite ( filename  )

Open a file within the zip for writing

Parameters
filenameThe file's name to open in current zip file
Returns
The file stream ID as an integer or 0 on failure.

Member Data Documentation

bool ZipObject::canSaveDynamicFields
string ZipObject::class

Script SuperClass of object.

string ZipObject::internalName
SimObjectPtr ZipObject::parentGroup

Group hierarchy parent of the object.

string ZipObject::superclass

Script Class of object.



Copyright © 2013 GarageGames, LLC. All Rights Reserved.