def do_cp(self, arguments):
        args = arguments.split()
        if len(args) != 2:
            print 'Usage: cp <source> <destination>'
            return

        #src, dst = args[0], args[1]

        src = resolve_reference(self.pwd, args[0])
        dst = resolve_reference(self.pwd, args[1])

        src = src.strip('/')
        dst = dst.strip('/')

        if not exists(self.fs, src):
           print "Source file '%s' does not exist!" % (src,)
           return

        #Get the parent directory of the source file
        srcparent = '/'.join(src.split('/')[:-1])

        #Get the object for source
        srcl = getpath(self.fs, src)

        #Get the object for the source's parent
        srcparentl = getpath(self.fs, srcparent)

        #if the specified filepath is a directory, maintain the current name
        if exists(self.fs, dst) and is_directory(self.fs, dst):
            dstparent = dst
            dstname = srcl[A_NAME]
        else:
            dstparent = '/'.join(dst.split('/')[:-1])
            dstname = dst.split('/')[-1]

        if exists(self.fs, dstparent + '/' + dstname):
            print 'A file already exists at %s/%s!' % (dstparent, dstname)
            return

        if not exists(self.fs, dstparent):
            print 'Destination directory %s doesn\'t exist!' % (dstparent,)
            return

        dstparentl = getpath(self.fs, dstparent)
        copy = srcl[:]
        copy[A_NAME] = dstname
        dstparentl[A_CONTENTS].append(copy)

        self.save_pickle()

        print 'File copied from /%s to /%s/%s' % (src, dstparent, dstname)
Return the contents of an object as a dict.
dataset/ETHPy150Open cowrie/cowrie/utils/fsctl.py/fseditCmd.do_cp--crossover with--dataset/ETHPy150Open JoelBender/bacpypes/py27/bacpypes/npdu.py/RoutingTableEntry.dict_contents