Answered File Share in C# With Smart Download

Sankararam

New member
Joined
Jan 21, 2021
Messages
2
Programming Experience
3-5
Hi I am trying to develop a Win Tool for File share like one drive, Drop box,...) I want to have the Smart Download. That is I will have all the files in the server or cloud. By client will have only the files with 0 bytes and their information. When I access the file (On demand) the file should get downloaded from the server. Reading file and file information from Server / Cloud could be easy. But looking for solution for creating the 0 bytes files and on demand download.

Kindly suggest me any tool to achieve the same.

Thanks in advance.
 
Solution
Or this thread could be a 1-2 SPAM fodder. Person A asks a question, and then later Person B responds with a spammy link to their product.
Should that happen, it shall be removed. (y)
Hi I am trying to develop a Win Tool for File share like one drive, Drop box,...)
That's not a cloud technology. That's a file sharing online drive. Nothing more. I don't think you know how cloud technology works, or what you're looking for. Let me explain...

Firstly, a cloud permits synchronisation of its content stored within its nodes, and this is done across multiple server locations that have access nodes shared across a variety of different server locations within a clouds infrastructure. And they are not limited to just one server...
But looking for solution for creating the 0 bytes files and on demand download.
So, the whole thing then. If you want to create a file then create a file. It's going to contain zero bytes unless you actually write something to it. As for the download, put some thought into it. A download is a download so you can find out how to do that easily enough. As for determining when to download, obviously you need to check the size of the file and do so if it's zero, so research how to check the size of a file.

People have difficulty writing code because they don't know what that code has to actually do and they don't know that because they don't take the time to think about it. Don't expect to go from an idea to working code. You go from an idea to to the logic required to implement that idea and, once you have determined that logic, you know exactly what your code has to do. Now, you can ask us specific questions if and when you encounter actual issues. You don't need any programming experience to work out the logic.
 
So, the whole thing then. If you want to create a file then create a file. It's going to contain zero bytes unless you actually write something to it. As for the download, put some thought into it. A download is a download so you can find out how to do that easily enough. As for determining when to download, obviously you need to check the size of the file and do so if it's zero, so research how to check the size of a file.

People have difficulty writing code because they don't know what that code has to actually do and they don't know that because they don't take the time to think about it. Don't expect to go from an idea to working code. You go from an idea to to the logic required to implement that idea and, once you have determined that logic, you know exactly what your code has to do. Now, you can ask us specific questions if and when you encounter actual issues. You don't need any programming experience to work out the logic.
Thank you very much for your reply.

I think I was not clear on the requirement in my previous.

I was able to read files from Cloud and download them into the client. But the requirement here is , I have to sync all the files from server. During that time I should not sync the content of file. Instead I should create all the files and folder in my client with same folder structure, but without occupying the space in Client. On clicking those files without content, the data should get synced from server and then file should get opened.

I believe in such case I have to work on Virtual File System and VFS driver. I am looking for product or third party utility by which I could achieve my need.
 
Annnd the question no one asked yet... Why create such an application?

Seems pointless given there are at least a hundred good ones already out there. If you plan on competing with rival technology softwares, you have your work cut out for you. So if you are using this new application of yours for yourself, why reinvent the wheel and why not use one of the already existing ones instead?

If you are wanting to create it because you just want to have your own file sharing app with sync capabilities, then your reasoning is rather pointless as far as i can see. Cloud technology is more than just file sharing and it's not a task I'd advise a dev with only 5 years experience to undertake.
 
Or this thread could be a 1-2 SPAM fodder. Person A asks a question, and then later Person B responds with a spammy link to their product. Both in post #1 and #3, the OP has asked for a tool or a 3rd party utility. Unfortunately Person B can't make it unto the forum because I've been rejecting a whole bunch of spammy accounts.
 
Last edited:
Or this thread could be a 1-2 SPAM fodder. Person A asks a question, and then later Person B responds with a spammy link to their product.
Should that happen, it shall be removed. (y)
Hi I am trying to develop a Win Tool for File share like one drive, Drop box,...)
That's not a cloud technology. That's a file sharing online drive. Nothing more. I don't think you know how cloud technology works, or what you're looking for. Let me explain...

Firstly, a cloud permits synchronisation of its content stored within its nodes, and this is done across multiple server locations that have access nodes shared across a variety of different server locations within a clouds infrastructure. And they are not limited to just one server. So I don't believe you are dealing with a cloud here from whatever dropbox type app you are downloading from. You appear to be dealing with at least one remote host, and not a cluster of hosts.

Secondly, client sync applications use a local database to accumulate all the data and record all interactions with the remote clouds nodes where they are permitted administratively. The local database includes the remote directory structures including file paths from both local and remote locations, and it also includes MD5 hashes for each file synced. Local directories are commonly mapped by their remote directory structures. When a file is changed on the local host, and the MD5 of that file is different to the one recorded on the servers database. The sync tool sends an API request to the server for a last modified time for the file being locally edited. It will sync the file according to its last modified property. This almost always requires a cloud to have an api in order for synchronisation to work efficiently between the local and remote database. The same applies to editing files in the cloud. If they are edited in the cloud, the sync tool will download the modified version from the cloud to the synced devices. By default and design, they are meant to download/upload all the data contained within the files, otherwise the local database and remote database would be forever fighting with each other. You can not have two files, one local file different from one remote file, and vice versa.

Lastly, given each local and remote file and directory has its own unique local path, and remote url. The job of the sync tool is to sync the data as it is received from the remote site and to do so by receiving all the bytes per each file. So when you said :
I was able to read files from Cloud and download them into the client. But the requirement here is , I have to sync all the files from server. During that time I should not sync the content of file. Instead I should create all the files and folder in my client with same folder structure, but without occupying the space in Client.
The word cloud gets thrown around to loosely among these file sharing apps. As they're completely different. I don't think it's a cloud you are working with because your understanding of how they work isn't correct.

So, if I understand, you basically want a shadow of a remote directory structure with the file structure but without any of the bytes of data within those files?
Both in post #1 and #3, the OP has asked for a tool or a 3rd party utility.
I am not aware of any sync tools they can use that do this, and the only alternative for something like that would require building their own custom sync tool. Would you agree?
 
Solution
There's a spammy link in StackOverflow that points to a github repository with sample code to use their library, but in essence, it was just a a big ad for someone's library. Need to pay before you can use their library, and their library is just a wrapper around the Win10 APIs I linked to on post #4.
 
Back
Top Bottom