home
 
 index of namespace default
 
 index of project core
 
 index of module core

Class core.File


SynopsisRepresents a file in the local file system.

  Base classes:
  Methods:
  Constants: See also:  


Method close
Close the current file.
Signature
close()
See also:  


 
 top of page
Method flush
Write pending buffers to disk..
Signature
flush()

 
 top of page
Method isOpen
Check whether the File object has a valid file handle.
Signature
isOpen():boolean
Returns
booleantrue if there is a valid file handle, false otherwise.
See also:  


 
 top of page
Method open
Open a file in the local file system.
Signature
open(Stringname,
  intaccessFlags 
  )  
 :boolean
Arguments
StringnameWhich file to open (pathname)
intaccessFlagsIOS_OUT for writing, IOS_IN for reading and IOS_INOUT for read-write access
Returns
booleantrue if the file has been opened successfully, false otherwise
See also:  


 
 top of page
Method openLocal
Deprecated:  
Open a file in the local file system.
Signature
openLocal(Stringname,
  intaccessFlags 
  )  
 :boolean
Arguments
StringnameWhich file to open (pathname)
intaccessFlagsIOS_OUT for writing, IOS_IN for reading and IOS_INOUT for read-write access
Returns
booleantrue if the file has been opened successfully, false otherwise
See also:  


 
 top of page
Method seek
Seek to the given file offset.
Signature
seek(intoffset,
  intmode 
  )  
Arguments
intoffsetByte offset
intmodeOne of SEEK_SET, SEEK_CUR, SEEK_END

 
 top of page
Method setOffset
Seek to the given absolute file offset (bytes).
Signature
setOffset(intoffset)
Arguments
intoffsetNew absolute file offset (bytes)
See also:  


 
 top of page
Constant IOS_IN (int)
File access mode "read-only".
Constant IOS_INOUT (int)
File access mode "read-write".
Constant IOS_OUT (int)
File access mode "write/create".
Constant SEEK_CUR (int)
Seek relative to current file offset.
Constant SEEK_END (int)
Seek relative to end of file.
Constant SEEK_SET (int)
Seek to absolute file offset.

 

Project Modules:core 
Project Classes:Boolean , Buffer , Byte , Class , ClassArray , Condition , Configuration , Double , DummyStream , Envelope , Event , Exception , File , Float , FloatArray , FloatArray128 , FloatArray16 , FloatArray32 , FloatArray64 , FloatArray8 , Function , HashTable , IntArray , IntArray128 , IntArray16 , IntArray32 , IntArray64 , IntArray8 , Integer , List , ListNode , Long , Mailbox , Mutex , Object , ObjectArray , PakFile , PointerArray , Pool , Script , SharedBuffer , Short , Stack , StdErrStream , StdInStream , StdOutStream , Stream , String , String128 , String16 , String32 , String64 , String8 , StringArray , StringIterator , Thread , Time , TKS , TreeNode , UnsignedByte , UnsignedInteger , UnsignedLong , UnsignedShort , Value , ValueArray , Variable 
Project Functions:ceil , exit , floor , GetCurrentThread , getenv , lcchar , mathAbsMaxf , mathAbsMinf , mathAbsMini , mathAbsMini , mathClampf , mathClampi , mathDistancePointPlane2d , mathLerpf , mathMaxf , mathMaxi , mathMinf , mathMini , mathPowerf , mathPoweri , mathSmoothStepf , mathWrapf , mathWrapi , milliSeconds , psystem , putenv , srand , system , ucchar 
All Namespaces:default , ui 
All Projects:core , debugtext , tkfreetype2 , tkmath , tkmidi , tkopengl , tkportaudio , tksdl , tkui , tkunit 


auto-generated by "DOG", the TkScript document generator. Mon, 28/Dec/2015 13:15:54