- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 1,071 for fclose (0.22 sec)
-
src/cmd/cgo/internal/swig/testdata/stdio/main.go
f := Fopen("main.go", "r") if f.Swigcptr() == 0 { fatal("fopen failed") } if Fgetc(f) != '/' || Fgetc(f) != '/' || Fgetc(f) != ' ' || Fgetc(f) != 'C' { fatal("read unexpected characters") } if Fclose(f) != 0 { fatal("fclose failed") } println("OK") } func fatal(f string, args ...any) { fmt.Fprintln(os.Stderr, fmt.Sprintf(f, args...)) os.Exit(1)
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri May 12 12:00:07 GMT 2023 - 975 bytes - Viewed (0) -
tensorflow/c/experimental/filesystem/plugins/gcs/cleanup.h
// // Example: // void func() { // FILE* fp = fopen("data.txt", "r"); // if (fp == nullptr) return; // auto fp_cleaner = gtl::MakeCleanup([fp] { fclose(fp); }); // // No matter what, fclose(fp) will happen. // DataObject d; // while (ReadDataObject(fp, &d)) { // if (d.IsBad()) { // LOG(ERROR) << "Bad Data"; // return; // }
C - Registered: Tue Apr 23 12:39:09 GMT 2024 - Last Modified: Thu Jul 09 11:16:00 GMT 2020 - 3.4K bytes - Viewed (0) -
src/cmd/cgo/internal/swig/testdata/stdio/main.swig
Plain Text - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri May 12 12:00:07 GMT 2023 - 563 bytes - Viewed (0) -
tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem.cc
// TODO(b/144055243): This should use `fsync`/`sync`. Flush(file, status); } static void Close(const TF_WritableFile* file, TF_Status* status) { auto posix_file = static_cast<PosixFile*>(file->plugin_file); if (fclose(posix_file->handle) != 0) TF_SetStatusFromIOError(status, errno, posix_file->filename); else TF_SetStatus(status, TF_OK, ""); }
C++ - Registered: Tue Apr 23 12:39:09 GMT 2024 - Last Modified: Sun Mar 24 20:08:23 GMT 2024 - 15.8K bytes - Viewed (0) -
android/guava/src/com/google/common/io/Closer.java
@VisibleForTesting Closer(Suppressor suppressor) { this.suppressor = checkNotNull(suppressor); // checkNotNull to satisfy null tests } /** * Registers the given {@code closeable} to be closed when this {@code Closer} is {@linkplain * #close closed}. * * @return the given {@code closeable} */ // close. this word no longer has any meaning to me.
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Mar 06 15:15:46 GMT 2024 - 11.9K bytes - Viewed (0) -
internal/http/close.go
) // DrainBody close non nil response with any response Body. // convenient wrapper to drain any remaining data on response body. // // Subsequently this allows golang http RoundTripper // to reuse the same connection for future requests. func DrainBody(respBody io.ReadCloser) { // Callers should close resp.Body when done reading from it. // If resp.Body is not closed, the Client's underlying RoundTripper
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 1.7K bytes - Viewed (0) -
internal/ioutil/ioutil.go
w.wLimit -= int64(n1) return n, err } n1, err = w.Writer.Write(p) w.wLimit -= int64(n1) return n, err } // Close closes the LimitWriter. It behaves like io.Closer. func (w *LimitWriter) Close() error { if closer, ok := w.Writer.(io.Closer); ok { return closer.Close() } return nil } // LimitedWriter takes an io.Writer and returns an ioutil.LimitWriter.
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Fri Apr 19 11:26:59 GMT 2024 - 10.3K bytes - Viewed (0) -
internal/lock/lock.go
r.mutex.Lock() r.refs++ r.mutex.Unlock() } // Close - this closer implements a special closer // closes the underlying fd only when the refs // reach zero. func (r *RLockedFile) Close() (err error) { r.mutex.Lock() defer r.mutex.Unlock() if r.refs == 0 { return os.ErrInvalid } r.refs-- if r.refs == 0 { err = r.File.Close() } return err }
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Sun Jan 02 17:15:06 GMT 2022 - 2.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/ByteSourceTest.java
private static final ByteSource BROKEN_CLOSE_SOURCE = new TestByteSource(new byte[10], CLOSE_THROWS); private static final ByteSource BROKEN_OPEN_SOURCE = new TestByteSource(new byte[10], OPEN_THROWS); private static final ByteSource BROKEN_READ_SOURCE = new TestByteSource(new byte[10], READ_THROWS); private static final ByteSink BROKEN_CLOSE_SINK = new TestByteSink(CLOSE_THROWS);
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 16.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/CloserTest.java
Closer closer = new Closer(suppressor); IOException exception = new IOException(); // c2 is added last, closed first TestCloseable c1 = closer.register(TestCloseable.normal()); TestCloseable c2 = closer.register(TestCloseable.throwsOnClose(exception)); try { closer.close(); } catch (Throwable expected) {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Mar 06 15:15:46 GMT 2024 - 13.6K bytes - Viewed (0)