Prev | Current Page 585 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

There are no types of directory, unless
you start delving into icons and whatnot, which you ??™ re not going to do. To create a directory, you use the
createDirectory method. Simple, huh? createDirectory only accepts one parameter; the path of
the directory you want to create. The only restrictions to this method are that you have the relevant
permissions to create the directory in the specified location, and that the directory you want to create is
in an existing directory. createDirectory will not create more than one directory at a time:
neko.FileSystem.createDirectory( ???c:\\projects??? );
Deleting a directory follows the same structure. Again, the specified path must provide a valid directory
with the necessary permissions:
neko.FileSystem.deleteDirectory( ???c:\\projects??? );
And deleting a file:
neko.FileSystem.deleteFile( ???c:\\projects\\archive.zip??? );
Reading from a Directory
Okay, so you can create directories and delete them, but you might find it hard to manage directories if
you don ??™ t know what they contain.


Pages:
573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597