Home
last modified time | relevance | path

Searched +refs:open +refs:truncate (Results 1 – 25 of 22706) sorted by relevance

12345678910>>...909

/dports/lang/rust/rustc-1.58.1-src/src/tools/clippy/tests/ui/
H A Dopen_options.stderr1 error: file opened with `truncate` and `read`
4 LL | OpenOptions::new().read(true).truncate(true).open("foo.txt");
7 = note: `-D clippy::nonsensical-open-options` implied by `-D warnings`
9 error: file opened with `append` and `truncate`
12 LL | OpenOptions::new().append(true).truncate(true).open("foo.txt");
18 LL | OpenOptions::new().read(true).read(false).open("foo.txt");
24 LL | OpenOptions::new().create(true).create(false).open("foo.txt");
30 LL | OpenOptions::new().write(true).write(false).open("foo.txt");
36 LL | OpenOptions::new().append(true).append(false).open("foo.txt");
39 error: the method `truncate` is called more than once
[all …]
H A Dopen_options.rs6 OpenOptions::new().read(true).truncate(true).open("foo.txt"); in main()
7 OpenOptions::new().append(true).truncate(true).open("foo.txt"); in main()
9 OpenOptions::new().read(true).read(false).open("foo.txt"); in main()
10 OpenOptions::new().create(true).create(false).open("foo.txt"); in main()
11 OpenOptions::new().write(true).write(false).open("foo.txt"); in main()
12 OpenOptions::new().append(true).append(false).open("foo.txt"); in main()
13 OpenOptions::new().truncate(true).truncate(false).open("foo.txt"); in main()
/dports/security/pkcs11-tools/pkcs11-tools-2.5.0/.gnulib/tests/
H A Dtest-truncate.c39 int fd = open (BASE "file", O_RDWR | O_TRUNC | O_CREAT, 0600); in main()
46 int fd = open (BASE "file", O_RDONLY); in main()
53 ASSERT (truncate (BASE "file", 314159) == 0); in main()
55 int fd = open (BASE "file", O_RDONLY); in main()
62 ASSERT (truncate (BASE "file", 3) == 0); in main()
64 int fd = open (BASE "file", O_RDONLY); in main()
71 ASSERT (truncate (BASE "file", 0) == 0); in main()
73 int fd = open (BASE "file", O_RDONLY); in main()
88 ASSERT (truncate (".", 0) == -1); in main()
95 ASSERT (truncate (BASE "file/", 0) == -1); in main()
[all …]
/dports/lang/mosh/mosh-0.2.7/tests/r6rs-test-suite/tests/r6rs/io/
H A Dports.sls123 (test (enum-set-member? 'no-truncate (file-options no-create no-fail no-truncate)) #t)
125 (test (enum-set-member? 'no-create (file-options no-create no-fail no-truncate)) #t)
208 (test/exn (open-file-output-port tmp-file (file-options no-truncate))
211 ;; Re-open if 'no-create is specified:
224 (file-options no-fail no-truncate))])
243 ;; Check that 'no-truncate doesn't truncate:
245 (file-options no-fail no-truncate))])
252 (file-options no-create no-truncate))])
259 (file-options no-create no-truncate))])
273 ;; Otherwise, truncate:
[all …]
/dports/lang/sagittarius-scheme/sagittarius-0.9.8/test/r6rs-test-suite/tests/r6rs/io/
H A Dports.sls120 (test (enum-set-member? 'no-truncate (file-options no-create no-fail no-truncate)) #t)
122 (test (enum-set-member? 'no-create (file-options no-create no-fail no-truncate)) #t)
205 (test/exn (open-file-output-port "io-tmp1" (file-options no-truncate))
208 ;; Re-open if 'no-create is specified:
221 (file-options no-fail no-truncate))])
240 ;; Check that 'no-truncate doesn't truncate:
242 (file-options no-fail no-truncate))])
249 (file-options no-create no-truncate))])
256 (file-options no-create no-truncate))])
270 ;; Otherwise, truncate:
[all …]
/dports/lang/rust/rustc-1.58.1-src/library/std/src/sys/unix/kernel_copy/
H A Dtests.rs22 .truncate(true) in copy_specialization()
37 .truncate(true) in copy_specialization()
74 OpenOptions::new().create(true).truncate(true).write(true).read(true).open(&source_path)?; in copies_append_mode_sink()
93 .truncate(true) in bench_file_to_file_copy()
96 .open(src_path) in bench_file_to_file_copy()
103 .truncate(true) in bench_file_to_file_copy()
105 .open(sink_path) in bench_file_to_file_copy()
123 .truncate(true) in bench_file_to_socket_copy()
126 .open(src_path) in bench_file_to_socket_copy()
155 .truncate(true) in bench_file_to_uds_copy()
[all …]
/dports/lang/sagittarius-scheme/sagittarius-0.9.8/ext/process/
H A Dprocess_stub.stub26 (define-cfn get-open-flags (option no-fail::int*) ::int :static
29 (no-truncate?::int (not (SG_FALSEP (Sg_Memq 'no-truncate opt))))
32 (cond ((and no-create? no-truncate?) (return 0)) ;;
34 (no-truncate? (return SG_CREATE))
39 (define-c-proc open-shared-memory (name::<string> size::<fixnum>
42 (Sg_AssertionViolation 'open-shared-memory
48 ;; so creation does truncate the shared memory
50 (get-open-flags option (& no-fail?)))))
/dports/www/py-seafobj/seafobj-8.0.7-server/test/functional/
H A Dcrypto_test.py19 with open(conf_path, 'w') as fd:
23 with open(conf_path, 'w') as fd:
24 fd.truncate(0)
44 with open(obj_path, 'wb') as fd:
45 fd.truncate(0)
54 with open(obj_path, 'wb') as fd:
55 fd.truncate(0)
/dports/databases/xtrabackup8/percona-xtrabackup-8.0.14/sql/
H A Dbinlog_ostream.h88 bool open(const char *dir, const char *prefix, my_off_t cache_size,
93 bool truncate(my_off_t offset) override;
176 bool open(my_off_t cache_size, my_off_t max_cache_size);
190 bool truncate(my_off_t offset) { return m_pipeline_head->truncate(offset); } in truncate() function
256 bool open(std::unique_ptr<Truncatable_ostream> down_ostream);
269 bool open(std::unique_ptr<Truncatable_ostream> down_ostream,
285 bool truncate(my_off_t offset) override;
/dports/sysutils/vector/vector-0.10.0/cargo-crates/tokio-0.2.21/src/fs/
H A Dopen_options.rs242 pub fn truncate(&mut self, truncate: bool) -> &mut OpenOptions { in truncate() method
243 self.0.truncate(truncate); in truncate()
378 pub async fn open(&self, path: impl AsRef<Path>) -> io::Result<File> { in open() method
382 let std = asyncify(move || opts.open(path)).await?; in open()
/dports/games/abstreet/abstreet-0.2.9-49-g74aca40c0/cargo-crates/tokio-0.2.21/src/fs/
H A Dopen_options.rs242 pub fn truncate(&mut self, truncate: bool) -> &mut OpenOptions { in truncate() method
243 self.0.truncate(truncate); in truncate()
378 pub async fn open(&self, path: impl AsRef<Path>) -> io::Result<File> { in open() method
382 let std = asyncify(move || opts.open(path)).await?; in open()
/dports/mail/thunderbird/thunderbird-91.8.0/third_party/rust/tokio/src/fs/
H A Dopen_options.rs242 pub fn truncate(&mut self, truncate: bool) -> &mut OpenOptions { in truncate() method
243 self.0.truncate(truncate); in truncate()
378 pub async fn open(&self, path: impl AsRef<Path>) -> io::Result<File> { in open() method
382 let std = asyncify(move || opts.open(path)).await?; in open()
/dports/www/firefox-esr/firefox-91.8.0/third_party/rust/tokio/src/fs/
H A Dopen_options.rs242 pub fn truncate(&mut self, truncate: bool) -> &mut OpenOptions { in truncate() method
243 self.0.truncate(truncate); in truncate()
378 pub async fn open(&self, path: impl AsRef<Path>) -> io::Result<File> { in open() method
382 let std = asyncify(move || opts.open(path)).await?; in open()
/dports/lang/spidermonkey78/firefox-78.9.0/third_party/rust/tokio/src/fs/
H A Dopen_options.rs242 pub fn truncate(&mut self, truncate: bool) -> &mut OpenOptions { in truncate() method
243 self.0.truncate(truncate); in truncate()
378 pub async fn open(&self, path: impl AsRef<Path>) -> io::Result<File> { in open() method
382 let std = asyncify(move || opts.open(path)).await?; in open()
/dports/audio/spotifyd/spotifyd-0.3.0/cargo-crates/tokio-0.2.11/src/fs/
H A Dopen_options.rs242 pub fn truncate(&mut self, truncate: bool) -> &mut OpenOptions { in truncate() method
243 self.0.truncate(truncate); in truncate()
378 pub async fn open(&self, path: impl AsRef<Path>) -> io::Result<File> { in open() method
382 let std = asyncify(move || opts.open(path)).await?; in open()
/dports/multimedia/gstreamer1-plugins-rust/tokio-2fd1551867c145cabe4548da2e37adc3bdf457a4/tokio/src/fs/
H A Dopen_options.rs242 pub fn truncate(&mut self, truncate: bool) -> &mut OpenOptions { in truncate() method
243 self.0.truncate(truncate); in truncate()
378 pub async fn open(&self, path: impl AsRef<Path>) -> io::Result<File> { in open() method
382 let std = asyncify(move || opts.open(path)).await?; in open()
/dports/lang/ferite/ferite-1.0.2/scripts/test-suite/
H A Dfilesystem.fe28 self.f = File.open('/tmp/ferite-test');
39 function open( )
41 object f = File.open("IhopeThatThisFileDoesNotExists");
106 function truncate()
109 if( self.f.truncate(String.length("ferite-test\n")) )
112 g = File.open( '/tmp/ferite-test', FileSystem.O_RDWR );
116 if( !g.truncate(String.length("ferite-test\n")) )
139 if( !g.truncate(String.length("ferite-test\n")) )
200 function open()
204 Directory.open( '/tmp' ) using ( entry ) {
[all …]
/dports/lang/chibi-scheme/chibi-scheme-0.10/lib/chibi/
H A Dfilesystem-test.sld35 ;; open without open/truncate writes in place
36 (let* ((fd (open tmp-file open/write))
37 (out (open-output-file-descriptor fd)))
42 ;; file-truncate can explicitly truncate
43 (let* ((fd (open tmp-file open/write))
44 (out (open-output-file-descriptor fd)))
46 (file-truncate out 7)
/dports/devel/sccache/sccache-0.2.15/cargo-crates/tokio-0.2.24/src/fs/
H A Dopen_options.rs242 pub fn truncate(&mut self, truncate: bool) -> &mut OpenOptions { in truncate() method
243 self.0.truncate(truncate); in truncate()
378 pub async fn open(&self, path: impl AsRef<Path>) -> io::Result<File> { in open() method
382 let std = asyncify(move || opts.open(path)).await?; in open()
/dports/net/gemserv/gemserv-v0.4.5/cargo-crates/tokio-0.2.24/src/fs/
H A Dopen_options.rs242 pub fn truncate(&mut self, truncate: bool) -> &mut OpenOptions { in truncate() method
243 self.0.truncate(truncate); in truncate()
378 pub async fn open(&self, path: impl AsRef<Path>) -> io::Result<File> { in open() method
382 let std = asyncify(move || opts.open(path)).await?; in open()
/dports/devel/sccache/sccache-0.2.15/cargo-crates/async-std-1.8.0/src/fs/
H A Dopen_options.rs184 pub fn truncate(&mut self, truncate: bool) -> &mut OpenOptions { in truncate() method
185 self.0.truncate(truncate); in truncate()
284 pub fn open<P: AsRef<Path>>(&self, path: P) -> impl Future<Output = io::Result<File>> { in open() method
288 let file = spawn_blocking(move || options.open(path)).await?; in open()
/dports/games/genact/genact-0.10.0/cargo-crates/async-std-1.6.3/src/fs/
H A Dopen_options.rs184 pub fn truncate(&mut self, truncate: bool) -> &mut OpenOptions { in truncate() method
185 self.0.truncate(truncate); in truncate()
284 pub fn open<P: AsRef<Path>>(&self, path: P) -> impl Future<Output = io::Result<File>> { in open() method
288 let file = spawn_blocking(move || options.open(path)).await?; in open()
/dports/net-im/fractal/fractal-4.4.0/vendor/tokio/src/fs/
H A Dopen_options.rs242 pub fn truncate(&mut self, truncate: bool) -> &mut OpenOptions { in truncate() method
243 self.0.truncate(truncate); in truncate()
378 pub async fn open(&self, path: impl AsRef<Path>) -> io::Result<File> { in open() method
382 let std = asyncify(move || opts.open(path)).await?; in open()
/dports/www/ffsend/ffsend-ccd489ce2e75b91c0f17fbf13dbd91fe84f5ad98/cargo-crates/tokio-0.2.25/src/fs/
H A Dopen_options.rs242 pub fn truncate(&mut self, truncate: bool) -> &mut OpenOptions { in truncate() method
243 self.0.truncate(truncate); in truncate()
378 pub async fn open(&self, path: impl AsRef<Path>) -> io::Result<File> { in open() method
382 let std = asyncify(move || opts.open(path)).await?; in open()
/dports/security/rustscan/RustScan-2.0.1/cargo-crates/async-std-1.7.0/src/fs/
H A Dopen_options.rs184 pub fn truncate(&mut self, truncate: bool) -> &mut OpenOptions { in truncate() method
185 self.0.truncate(truncate); in truncate()
284 pub fn open<P: AsRef<Path>>(&self, path: P) -> impl Future<Output = io::Result<File>> { in open() method
288 let file = spawn_blocking(move || options.open(path)).await?; in open()

12345678910>>...909