public function save($selection = null)
	{
		// prepare the selection
		if (func_num_args())
		{
			if (is_array($selection))
			{
				$filter = array();

				foreach ($this->container as $file)
				{
					$match = true;
					foreach($selection as $item => $value)
					{
						if ($value != $file->{$item})
						{
							$match = false;
							break;
						}
					}

					$match and $filter[] = $file;
				}

				$selection = $filter;
			}
			else
			{
				$selection =  array($this[$selection]);
			}
		}
		else
		{
			$selection = $this->container;
		}

		// loop through all selected files
		foreach ($selection as $file)
		{
			$file->save();
		}
	}
public function save($selection = null)
	{
		// prepare the selection
		if (func_num_args())
		{
			if (is_array($selection))
			{
				$filter = array();

				foreach ($this->container as $file)
				{
					$match = true;
					foreach($selection as $item => $value)
					{
						if ($value != $file->{$item})
						{
							$match = false;
							break;
						}
					}

					$match and $filter[] = $file;
				}

				$selection = $filter;
			}
			else
			{
				$selection =  array($this[$selection]);
			}
		}
		else
		{
			$selection = $this->container;
		}

		// loop through all selected files
		foreach ($selection as $file)
		{
			$file->save();
		}
	}
public function save ( $ selection = null ) { // prepare the selection if ( func_num_args ( ) ) { if ( is_array ( $ selection ) ) { $ filter = array ( ) ; foreach ( $ this -> container as $ file ) { $ match = true ; foreach ( $ selection as $ item => $ value ) { if ( $ value != $ file -> { $ item } ) { $ match = false ; break ; } } $ match and $ filter [ ] = $ file ; } $ selection = $ filter ; } else { $ selection = array ( $ this [ $ selection ] ) ; } } else { $ selection = $ this -> container ; } // loop through all selected files foreach ( $ selection as $ file ) { $ file -> save ( ) ; } }
Runs save on all loaded file objects

@param integer|string|array $selection
Runs save on all loaded file objects