Asp.net Development Network hard drive [resend + modify]

Source: Internet
Author: User
Asp.net network hard drive development

Common file transmission methods: FTP (too complex), emai (not secure), and network neighbors (limited scope ). The three methods are mainly point-to-point oriented.

A network hard disk is characterized by the mutual occurrence of space resources.

Use Case:
Operations on your hard disk: View, upload, download, delete, create directory, copy and paste files, and set permissions.
Operations on shared resources: search.

(Folder permission settings: unreadable, unwritable, and writable)
Folder information is stored in folder. XML in the root directory of the folder.

Technical details:
1. display the directory, create a folder, and set permissions:
(The Directory class is transferred from msdn to publish static methods for creating, moving, and enumerating directories and subdirectories. SetDirectoryClass is used for typical operations, such as copying, moving, renaming, creating, and deleting directories. You can also setDirectoryClass is used to obtain and set datetime information related to Directory Creation, access, and write operations .)
Directory. getfilesystementries returns the names of all files and subdirectories in the specified directory.
2. For file operations, download <a href =...> download </a> to delete file. Delete (URL );
For folder operations, please pay attention to permission issues. Delete low: delete all classes in the folder. delete folders.
Deletefolder (){
Foreach (string D in directory. getfilesystementries (DIR ))
{
If (file. exists (d ))
File. Delete (d); // delete the file directly.
Else
Deletefolder (d); // recursively Delete subfolders
}
Directory. Delete (DIR); // delete an empty folder
}
3. Upload httppostedfile httpfilecollection
4. Track the current directory to enable the folder to go up.
5. How does one search for shared resources to record the paths of all shared resources?
Information about storing shared resources in the database path category specific permissions of the owner

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.