<commit_before><?php
/**
 * The location management services offer operation to manipulate files and folders in the file system of the CIP server or on FTP servers. In order to control who is allowed to perform the operations the DAM user needs to have specific permissions.
 * In a Cumulus DAM system the following list shows the server permissions required to perform location management operations:
 * $CanDeleteFiles - allow to delete a files and directories
 * $CanCopyFiles - allow to copy a files and directories
 * $CanMoveFiles - allow to move/rename a files and directories
 * $CanListFiles - allow to list a files and directories
 * $CanCreateDirectories - allow to create a directories
 * The locations can be specified either by a complete URL starting with "ftp:", "sftp", "ftps", or "file" or they can be starting with the name of a configured location.
 * When specifying a complete URL the corresponding protocol (e.g. "file") needs to be activated in the configuration file.
 * In order to be able to check the permission you need to specify the user, password, and server address in the request or use a session that contains these parameters.
 * @see http://crc.canto.com/CIP/doc/CIP.html#location
 */
namespace CIP\services\location;
class LocationService extends \CIP\services\BaseService {
	
	/**
	 * Lists files and directories found in the requested location. This operation can be used to check whether a given file or directory exists.
	 * - If the location specifies a file the result is the same location again.
	 * - If the location specifies a directory the result contains a list of names for the contained files or directories.
	 * - If the location is not valid (e.g. file/directory does not exist) an error is returned.
	 * The user specified in the request needs the server permission $CanListFiles to perform this action.
	 * @see http://crc.canto.com/CIP/doc/CIP.html#location_list
	 * @param string $location The name of a catalog alias definition from the configuration file. See the configuration section for details on how to define catalog aliases.
	 * @return mixed A list of locations for all files/directories contained.
	 */
	public function get($location) {
		return $this->_client->call(self::getServiceName(), __FUNCTION__, array(), array(<commit_msg>Fixing the name from get to list<commit_after><?php
/**
 * The location management services offer operation to manipulate files and folders in the file system of the CIP server or on FTP servers. In order to control who is allowed to perform the operations the DAM user needs to have specific permissions.
 * In a Cumulus DAM system the following list shows the server permissions required to perform location management operations:
 * $CanDeleteFiles - allow to delete a files and directories
 * $CanCopyFiles - allow to copy a files and directories
 * $CanMoveFiles - allow to move/rename a files and directories
 * $CanListFiles - allow to list a files and directories
 * $CanCreateDirectories - allow to create a directories
 * The locations can be specified either by a complete URL starting with "ftp:", "sftp", "ftps", or "file" or they can be starting with the name of a configured location.
 * When specifying a complete URL the corresponding protocol (e.g. "file") needs to be activated in the configuration file.
 * In order to be able to check the permission you need to specify the user, password, and server address in the request or use a session that contains these parameters.
 * @see http://crc.canto.com/CIP/doc/CIP.html#location
 */
namespace CIP\services\location;
class LocationService extends \CIP\services\BaseService {
	
	/**
	 * Lists files and directories found in the requested location. This operation can be used to check whether a given file or directory exists.
	 * - If the location specifies a file the result is the same location again.
	 * - If the location specifies a directory the result contains a list of names for the contained files or directories.
	 * - If the location is not valid (e.g. file/directory does not exist) an error is returned.
	 * The user specified in the request needs the server permission $CanListFiles to perform this action.
	 * @see http://crc.canto.com/CIP/doc/CIP.html#location_list
	 * @param string $location The name of a catalog alias definition from the configuration file. See the configuration section for details on how to define catalog aliases.
	 * @return mixed A list of locations for all files/directories contained.
	 */
	public function list($location) {
		return $this->_client->call(self::getServiceName(), __FUNCTION__, array(), array(
{'fraction_non_alphanumeric': 0.06144526179143228, 'fraction_numerical': 0.0, 'mean_word_length': 4.223728813559322, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3824188', 'n_tokens_mistral': 1136, 'n_tokens_neox': 1080, 'n_words': 635}