[eluser]therealmaloy[/eluser]
Atno
class SampleClassname {
//some constructs and/or whatever
function index(){
...
$data['retval'] = $this->getFileList(...); //note on using it inside the class use $this
}
private function getFileList($dir, $recurse=false) {
...
}
} //end of class
you just precede your function with private modifier keyword, you can also further read about other access modifiers such as protected, by default if nothing precedes your function it is considered public...
it's nice to know some stuff about OOP knowing that CI is a good implementation of such.
you can check and look at CI helpers and plugins to slowly create your own set of important functions, such as this.