mirror of
				https://github.com/fog/fog.git
				synced 2022-11-09 13:51:43 -05:00 
			
		
		
		
	[ninefold|storage] Add copy method to Ninefold::File.
This commit is contained in:
		
							parent
							
								
									de1ec2d079
								
							
						
					
					
						commit
						b1c3e80c64
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -28,6 +28,14 @@ module Fog
 | 
			
		|||
          @directory
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        def copy(target_directory_key, target_file_key, options={})
 | 
			
		||||
          target_directory = connection.directories.new(:key => target_directory_key)
 | 
			
		||||
          target_directory.files.create(
 | 
			
		||||
            :key => target_file_key,
 | 
			
		||||
            :body => body
 | 
			
		||||
          )
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        def destroy
 | 
			
		||||
          requires :directory, :key
 | 
			
		||||
          connection.delete_namespace([directory.key, key].join('/'))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue