Lines Matching refs:s

34   Status s = env->NewSequentialFile(filename, &orig_file, options);  in Truncate()  local
35 if (!s.ok()) { in Truncate()
37 filename.c_str(), s.ToString().c_str()); in Truncate()
38 return s; in Truncate()
43 s = orig_file->Read(length, &result, scratch.get()); in Truncate()
47 if (s.ok()) { in Truncate()
50 s = env->NewWritableFile(tmp_name, &tmp_file, options); in Truncate()
51 if (s.ok()) { in Truncate()
52 s = tmp_file->Append(result); in Truncate()
53 if (s.ok()) { in Truncate()
54 s = env->RenameFile(tmp_name, filename); in Truncate()
57 filename.c_str(), s.ToString().c_str()); in Truncate()
62 if (!s.ok()) { in Truncate()
64 s.ToString().c_str()); in Truncate()
67 return s; in Truncate()
129 Status s = target_->Append(data); in Append() local
130 if (s.ok()) { in Append()
134 return s; in Append()
139 Status s = target_->Close(); in Close() local
140 if (s.ok()) { in Close()
143 return s; in Close()
147 Status s = target_->Flush(); in Flush() local
148 if (s.ok() && env_->IsFilesystemActive()) { in Flush()
151 return s; in Flush()
214 Status s = target()->NewDirectory(name, &r); in NewDirectory() local
215 assert(s.ok()); in NewDirectory()
216 if (!s.ok()) { in NewDirectory()
217 return s; in NewDirectory()
230 Status s = target()->FileExists(fname); in NewWritableFile() local
231 if (s.ok()) { in NewWritableFile()
233 } else if (!s.IsNotFound()) { in NewWritableFile()
234 assert(s.IsIOError()); in NewWritableFile()
235 return s; in NewWritableFile()
237 s = target()->NewWritableFile(fname, result, soptions); in NewWritableFile()
238 if (s.ok()) { in NewWritableFile()
249 return s; in NewWritableFile()
258 Status s = target()->ReopenWritableFile(fname, result, soptions); in ReopenWritableFile() local
259 if (s.ok()) { in ReopenWritableFile()
270 return s; in ReopenWritableFile()
279 Status s = target()->NewRandomRWFile(fname, result, soptions); in NewRandomRWFile() local
280 if (s.ok()) { in NewRandomRWFile()
291 return s; in NewRandomRWFile()
307 Status s = EnvWrapper::DeleteFile(f); in DeleteFile() local
308 if (!s.ok()) { in DeleteFile()
310 s.ToString().c_str()); in DeleteFile()
312 if (s.ok()) { in DeleteFile()
315 return s; in DeleteFile()
318 Status FaultInjectionTestEnv::RenameFile(const std::string& s, in RenameFile() argument
323 Status ret = EnvWrapper::RenameFile(s, t); in RenameFile()
327 if (db_file_state_.find(s) != db_file_state_.end()) { in RenameFile()
328 db_file_state_[t] = db_file_state_[s]; in RenameFile()
329 db_file_state_.erase(s); in RenameFile()
332 auto sdn = GetDirAndName(s); in RenameFile()
378 Status s; in DropFileData() local
382 s.ok() && it != db_file_state_.end(); ++it) { in DropFileData()
385 s = func(target(), state); in DropFileData()
388 return s; in DropFileData()
414 Status s = DeleteFile(pair.first + "/" + name); in DeleteFilesCreatedAfterLastDirSync() local
415 if (!s.ok()) { in DeleteFilesCreatedAfterLastDirSync()
416 return s; in DeleteFilesCreatedAfterLastDirSync()