Exemplo n.º 1
0
 public void DeleteFileTest()
 {
     FileModel target = new FileModel();
     int fileId = 0;
     int userId = 0;
     target.DeleteFile(fileId, userId);
 }
Exemplo n.º 2
0
        public void CreateFileTest()
        {
            FileModel target = new FileModel();

            int userId = 2;
            string name = "text3.txt";
            string physicalPath = @"\7d9cf1d0\8deb\4218\a455\6526947ecdda\73725d2c-7209-4bd0-8542-57d83ecd5edb.file";
            int directoryId = 1;
            bool isPublic = false;
            long size = 4;
            if (target.Exist(directoryId, name, userId))
            {
                File fileInfo = target.GetFile(directoryId, name, userId);
                target.DeleteFile(fileInfo.FileId, userId);
            }
            target.CreateFile(userId, name, physicalPath, directoryId, isPublic, size);
        }