Home | History | Annotate | Download | only in disk_cache

Lines Matching refs:FILES

16 // Returns the number of files in this folder.
18 file_util::FileEnumerator iter(path, false, file_util::FileEnumerator::FILES);
35 BlockFiles files(path);
36 ASSERT_TRUE(files.Init(true));
41 // Fill up the 32-byte block file (use three files).
43 EXPECT_TRUE(files.CreateBlock(RANKINGS, 4, &address[i]));
47 // Make sure we don't keep adding files.
50 files.DeleteBlock(address[target], false);
51 EXPECT_TRUE(files.CreateBlock(RANKINGS, 4, &address[target]));
56 // We should be able to delete empty block files.
62 BlockFiles files(path);
63 ASSERT_TRUE(files.Init(true));
68 // Fill up the 32-byte block file (use three files).
70 EXPECT_TRUE(files.CreateBlock(RANKINGS, 4, &address[i]));
73 // Now delete all the blocks, so that we can delete the two extra files.
75 files.DeleteBlock(address[i], false);
80 // Handling of block files not properly closed.
86 BlockFiles files(path);
87 ASSERT_TRUE(files.Init(true));
97 EXPECT_TRUE(files.CreateBlock(RANKINGS, size, &address));
111 files.DeleteBlock(address, false);
118 MappedFile* file = files.GetFile(address);
138 files.CloseFiles();
140 ASSERT_TRUE(files.Init(false));
143 file = files.GetFile(address);
158 // Handling of truncated files.
164 BlockFiles files(path);
165 ASSERT_TRUE(files.Init(true));
167 FilePath filename = files.Name(0);
168 files.CloseFiles();
169 // Truncate one of the files.
177 ASSERT_FALSE(files.Init(false));
180 // Handling of truncated files (non empty).
186 BlockFiles files(path);
187 ASSERT_TRUE(files.Init(true));
189 EXPECT_TRUE(files.CreateBlock(RANKINGS, 2, &address));
191 FilePath filename = files.Name(0);
192 files.CloseFiles();
193 // Truncate one of the files.
201 ASSERT_FALSE(files.Init(false));
210 BlockFiles files(path);
211 ASSERT_TRUE(files.Init(true));
215 EXPECT_TRUE(NULL == files.GetFile(addr));
218 FilePath filename(files.Name(5));
224 EXPECT_TRUE(NULL == files.GetFile(addr));
227 EXPECT_TRUE(NULL == files.GetFile(addr));
235 BlockFiles files(path);
236 ASSERT_TRUE(files.Init(false));
239 files.GetFileStats(0, &used, &load);
243 files.GetFileStats(1, &used, &load);
247 files.GetFileStats(2, &used, &load);
258 BlockFiles files(path);
259 ASSERT_TRUE(files.Init(true));
267 EXPECT_TRUE(files.CreateBlock(BLOCK_1K, block_size, &address[i]));
276 EXPECT_TRUE(files.IsValid(address[i]));
282 reinterpret_cast<BlockFileHeader*>(files.GetFile(address[0])->buffer());
291 files.DeleteBlock(address[i], false);