ASP.NET development network hard disk
File transfer common way: ftp (too complicated), EMAI (not safe enough), online neighbor (range limited). This 3 medium is mainly directed to point-to-point.
The network hard disk feature is: a spatial resource mutual.
Example:
User's operations for their hard drives: View, upload, download, delete, create a directory, file copy paste, set permissions.
Operation of shared resources: Search.
(Folder permissions setting: not readable, password readable, password can be written, readable, can be writable)
The folder information is stored in the file clamp root directory with the Folder.xml.
technical details:
1 Display the directory, create a new folder, set permissions:
(About the Directory class to disclose a static method for creating, moving, and enumerating the directory and subdirectory from MSDN.
The Directory class is used for typical operations such as copy, move, rename, create and delete the directory. Can also
The Directory class is used to obtain DateTime information related to the creation, access, and write operations of the directory. )
Directory.GetFileSystemEmentries returns the name of all files and subdirectories in the specified directory.
2 Operation of the file, download download Delete File.delete (URL);
Problem to pay attention to the folder to pay attention to the low-return folder in the delete folder
DeleteFolder () {
FOREACH (String DIRECTORY.GETFILESYSTEMENTRIES (DIR))
{
IF (file.exists (d))
File.delete (d); // Directly delete the files
Else
DeleteFolder (D); // Removes Delete subfolder
}
Directory.delete (DIR); // Delete the empty folder
}
3 Upload httppostedfile httpfilecollection
4 Track the functionality that the current directory implementation folder is entered.
5 Search for shared resources Record all the paths of all shared resources?
The information path category of shared resources is stored in the database specific authority