Example #1
0
        public void Copy(IFilePath targetFilePath, bool overwrite = true, bool ensureDirectoryForFile = true)
        {
            targetFilePath.ThrowArgumentExceptionIfNull(nameof(targetFilePath));

            if (ensureDirectoryForFile)
            {
                targetFilePath.EnsureDirectory();
            }

            File.Copy(this.Value, targetFilePath.Value, overwrite);
        }