search(
            NodeRef contextNodeRef,
            String namePattern,
            boolean fileSearch,
            boolean folderSearch,
            boolean includeSubFolders);
    
    /**
     * Rename a file or folder in its current location
     * 
     * @param fileFolderRef the file or folder to rename
     * @param newName the new name
     * @return Return the new file info
     * @throws FileExistsException if a file or folder with the new name already exists
     * @throws FileNotFoundException the file or folder reference doesn't exist
     */
    @Auditable(key = Auditable.Key.ARG_0, parameters = {"fileFolderRef", "newName"})
    public FileInfo rename(NodeRef fileFolderRef, String newName) throws FileExistsException, FileNotFoundException;
    
    /**
     * Move a file or folder to a new name and/or location.
     * 
     * If both the parent folder and name remain the same, then nothing is done.
     * 
     * @param sourceNodeRef the file or folder to move
     * @param targetParentRef the new parent node to move the node to - null means rename in situ
     * @param newName the name to change the file or folder to - null to keep the existing name
     * @return Returns the new file info
     * @throws FileExistsException
     * @throws FileNotFoundException
     */
    @Auditable(key = Auditable.Key.ARG_0, parameters = {"sourceNodeRef", "targetParentRef", "newName"})
    public FileInfo move(NodeRef sourceNodeRef, NodeRef targetParentRef, String newName)
            throws FileExistsException, FileNotFoundException;
    /**
     * Copy a source file or folder.  The source can be optionally renamed and optionally
     * moved into another folder.
     * 
     * If both the parent folder and name remain the same, then nothing is done.
     * 
     * @param sourceNodeRef the file or folder to copy
     * @param targetParentRef the new parent node to copy the node to - null means rename in situ
     * @param newName the new name, or null to keep the existing name.
     * @return Return the new file info
     * @throws FileExistsException
     * @throws FileNotFoundException
     */
    @Auditable(key = Auditable.Key.ARG_0, parameters = {"sourceNodeRef", "targetParentRef", "newName"})
    public FileInfo copy(NodeRef sourceNodeRef, NodeRef targetParentRef, String newName)
            throws FileExistsException, FileNotFoundException;
    /**
     * Create a file or folder; or any valid node of type derived from file or folder.
     * 
     * The association QName for the patch defaults to cm:filename i.e. the
     * Content Model namespace with the filename as the local name.
     * 
     * @param parentNodeRef the parent node.  The parent must be a valid
     *      {@link org.alfresco.model.ContentModel#TYPE_FOLDER folder}.
     * @param name the name of the node
     * @param typeQName the type to create
     * @return Returns the new node's file information
     * @throws FileExistsException
     * 
     * @see {@link #create(NodeRef, String, QName, QName)}
     */
    @Auditable(key = Auditable.Key.ARG_0, parameters = {"parentNodeRef", "name", "typeQName"})
    public FileInfo create(NodeRef parentNodeRef, String name, QName typeQName) throws FileExistsException;
    
    /**
     * Create a file or folder; or any valid node of type derived from file or folder
     * 
     * @param parentNodeRef the parent node.  The parent must be a valid
     *      {@link org.alfresco.model.ContentModel#TYPE_FOLDER folder}.
     * @param name the name of the node
     * @param typeQName the type to create
     * @param assocQName the association QName to set for the path (may be null).
     * @return Returns the new node's file information
     * @throws FileExistsException
     */
    @Auditable(key = Auditable.Key.ARG_0, parameters = {"parentNodeRef", "name", "typeQName"})
    public FileInfo create(NodeRef parentNodeRef, String name, QName typeQName, QName assocQName) throws FileExistsException;
    
    /**
     * Delete a file or folder
     * 
     * @param nodeRef the node to delete
     */
    @Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"})
    public void delete(NodeRef nodeRef);
      
    /**
     * Get the file or folder names from the root down to and including the node provided.
     * 
     *   - The root node can be of any type and is not included in the path list.*
- Only the primary path is considered.  If the target node is not a descendant of the
     *       root along purely primary associations, then an exception is generated.*
- If an invalid type is encountered along the path, then an exception is generated.*
* 
     * @param rootNodeRef the start of the returned path, or null if the store root
     *      node must be assumed.
     * @param nodeRef a reference to the file or folder
     * @return Returns a list of file/folder infos from the root (excluded) down to and
     *      including the destination file or folder
     * @throws FileNotFoundException if the node could not be found
     */
    @Auditable(key = Auditable.Key.ARG_0, parameters = {"rootNodeRef", "nodeRef"})
    public List getNamePath(NodeRef rootNodeRef, NodeRef nodeRef) throws FileNotFoundException;
    
    /**
     * Resolve a file or folder name path from a given root node down to the final node.
     * 
     * @param rootNodeRef the start point node - a cm:folder type or subtype, e.g. the Company Home's nodeRef
     * @param pathElements a list of names in the path. Do not include the referenced rootNodeRef's path element.
     * @return Returns the info of the file or folder
     * @throws FileNotFoundException if no file or folder exists along the path
     */
    @Auditable(key = Auditable.Key.ARG_0, parameters = {"rootNodeRef", "pathElements"})
    public FileInfo resolveNamePath(NodeRef rootNodeRef, List pathElements) throws FileNotFoundException;
    
    /**
     * Get the file info (name, folder, etc) for the given node
     * 
     * @param nodeRef the node to get info for
     * @return Returns the file info or null if the node does not represent a file or folder
     */
    @Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"})
    public FileInfo getFileInfo(NodeRef nodeRef);
    
    /**
     * Get the reader to the file represented by the node according to the File/Folder model.
     * (This is not the same as the method on the ContentService)
     * 
     * @param nodeRef the content node
     * @return Returns a handle to the content associated with the node
     */
    @Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"})
    public ContentReader getReader(NodeRef nodeRef);
    
    /**
     * Get the writer to the file represented by the node according to the File/Folder model.
     * (This is not the same as the method on the ContentService)
     * 
     * @param nodeRef the content node
     * @return Returns a handle to the content associated with the node
     */
    @Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"})
    public ContentWriter getWriter(NodeRef nodeRef);
    
    
    /**
     * Check the validity of a node reference
     * 
     * @return          returns true if the NodeRef is valid
     */
    @Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"})
    public boolean exists(NodeRef nodeRef);
    
    /**
     * Checks the type for whether it is a recognised file or folder type or is invalid for the FileFolderService.
     * 
     * @param typeQName the type to check
     * @return - the type
     */
    @Auditable(parameters = {"typeQName"})
    public FileFolderServiceType getType(QName typeQName);
}