Prev | Current Page 581 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

Utilizing streams, haXe makes it all too easy to direct file data wherever
you want, or direct almost any external data into a file. For instance, utilizing the haXe FTP functionality
from the Motion - Twin libraries, you could quite easily bind the handle from a File object and redirect
its data directly into a stream attained from a remote file, thus facilitating a transfer of file content, rather
than the file itself.
Traversing Files and Directories
File and directory traversal functionality in Neko can be accessed from the neko.FileSystem class.
Here, you will find common functionality used in locating and describing files as well as complete
directory management methods. Table 11 - 8 details the methods of the neko.FileSystem class:
Table 11-8
Methods Description
createDirectory( path : String ) :
Void
Creates a directory from the given string
deleteDirectory( path : String ) :
Void
Deletes a specified directory
deleteFile( path : String ) : Void Deletes a specified file
Table continued on following page
302
Part II: Server Side, JavaScript, and Flash: Oh My!
Paths
One of the key features when dealing with files in Neko is its level of forgiveness with regard to path
strings.


Pages:
569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593