| |

VerySource

 Forgot password?
 Register
Search
View: 845|Reply: 5

[SOLVED] How to achieve file copy in C ++? ?

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 Invalid IP Address

Post time: 2020-1-6 09:00:01
| Show all posts |Read mode
I am going to make a virtual file management system (note that it is virtual). Now the file copy and cut functions will not be done. Copy is not a strcpy that calls the DOS function. All operations are simulated in memory instead of operation. Copy files to hard drive! Please master help! !! Thank you! !! !!
Reply

Use magic Report

0

Threads

36

Posts

13.00

Credits

Newbie

Rank: 1

Credits
13.00

 China

Post time: 2020-1-8 09:18:01
| Show all posts
Make a file memory map, then perform operation mapping, and store the results in the file.
Reply

Use magic Report

0

Threads

55

Posts

44.00

Credits

Newbie

Rank: 1

Credits
44.00

 Invalid IP Address

Post time: 2020-2-20 17:45:01
| Show all posts
Since you have virtual file management in memory, then of course you use malloc to allocate memory, memcpy.
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-3-21 09:15:02
| Show all posts
If the file is too large, you can use memory file mapping. Linux is not familiar and should also provide this function
Reply

Use magic Report

0

Threads

9

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-3-30 11:45:01
| Show all posts
It can be byte-by-byte, word-by-word ... COPY, if you want BT points, you can also bit by bit. ^ _ ^
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-4-14 11:00:01
| Show all posts
Remember that there is an API for performing similar file operations on memory in Windows. It may be useful. You can check it out. It seems to be called
MemoryFile ()
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list