Commits

christiansalazar committed 15433b0

readme, arg doc

  • Participants
  • Parent commits dc8eb2f

Comments (0)

Files changed (1)

 	$identity = Yii::app()->user->id; // or any IDentificator.
 
 	// ADD FILES
-	//
+	//	add_files return an array of file_id.
 	Yii::app()->fileman->add_files($identity,"/some/place/filename.mp3");
 	Yii::app()->fileman->add_files($identity,array("file1", "file2"));
 
 	// LIST FILES
-	//
+	//   it returns an array of file-data: 
+	//		"id" (identity), "file_id", "filename", "longfilename"
 	foreach(Yii::app()->fileman->list_files($identity) as $fd)
 		printf("file -> [%s] [%s] [%s]\n",
 				$fd['id'],$fd['file_id'],$fd['filename']);
 
 	// QUERY THE REAL PATH FOR A GIVEN FILE ID
-
+	//  
 	$real_path = Yii::app()->fileman->get_file_path($id, "18aac1a12");
 	// ..do what ever you want with this file...
 	printf("the real local path is: %s\n",$real_path);
 	
 	// REMOVE FILES
-	//
-	Yii::app()->fileman->remove_file($identity, "file1");
-	Yii::app()->fileman->remove_file($identity, array("file1","file2"));
+	//   using the file_id provided when calling list_files()
+	Yii::app()->fileman->remove_file($identity, "18ac11981");
+	Yii::app()->fileman->remove_file($identity, array("288abc12","2029acb12"));
 
 ### Yii File Manager Class Diagram