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 , LFSR , LFSR_NR , List , ListNode , Long , Mailbox , Mutex , Object , ObjectArray , PakFile , PointerArray , Pool , Process , 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 , mathCerpf , mathClampf , mathClampi , mathDistancePointPlane2d , mathFoldf , mathFoldi , mathGCD , mathLerpCyclicf , mathLerpf , mathMaxf , mathMaxi , mathMinf , mathMini , mathNextCyclicf , mathPowerf , mathPowerfC , mathPoweri , mathSerpf , mathSmoothStepf , mathSmoothStepNf , mathWrapf , mathWrapi , milliSeconds , milliSecondsDouble , psystem , putenv , srand , system , ucchar 
All Namespaces:default , graph , ui 
All Projects:core , eqxmms , ShaderVG , ShaderVG_Text , tkanalogrytm , tkchipmunk , tkclap , tkfileutils , tkfreeglut , tkfreetype2 , tkfreeverb , tkmath , tkmidi , tkmidipipe , tkminnie , tkoldmath , tkopengl , tkportaudio , tkradiastools , tksamplechain , tksampleedit , tksampler , tksdl , tksdl_net , tksidplay2 , tkspeexdsp , tksqlite , tktriangulate , tkui , tkvst2 , tkzip , ui , yingtest 


auto-generated by "DOG", the TkScript document generator. Thu, 11/Dec/2025 13:41:59