company logo

File :: copy - Copy file

The function copies the file or directory to the location passed in sPath . The function allows copying single files, all files in a directory or directories and all its subordinated directories and files.

Implementation overview

Implementation details

  1. Copy single file
    File  :: copy ( odaba::String &sPath )

    The function copies a single file. When the current file location is a directory, all files in the directory are copied. In this case, the target location must not be a file. When the target location does not exist, a corresponding directory will be created.

    • sPath - File path
  2. to list
  3. Copy directories recursive
    File  :: copy ( odaba::String &sPath, bool bRecursive )

    The function allows copying directories recursive, i.e. all sub-directories and its files may be copied. The source location must be a directory and the target location must not be a file. When the target location does not exist, a corresponding directory will be created.

    Recursive copy is done when by passing true in bRecursive .

    • sPath - File path
    • bRecursive - Process recursive

      The function is called recursively for subordinated elements.

  4. to list