Sys/IO/FileStream.pm untested

filter: Statementstmt n/a Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a SCAR -
1 package SPVM::Sys::IO::FileStream;
2  
3 1;
4  
5 =head1 Name
6  
7 SPVM::Sys::IO::FileStream - C<FILE> structure in the C language.
8  
9 =head1 Description
10  
11 The Sys::IO::FileStream in L<SPVM> represetns the L<FILE|https://linux.die.net/man/3/fopen> structure in the C language.
12  
13 =head1 Usage
14
15 use Sys::IO::FileStream;
16  
17 =head1 Details
18  
19 This class is a pointer class. The pointer the instance has is set to a C<FILE> object.
20  
21 =head1 Fields
22  
23 =head2 closed
24  
25 C<has closed : ro byte;>
26  
27 The file stream is closed.
28  
29 =head2 opened_by_popen
30  
31 C<has opened_by_popen : ro byte;>
32  
33 The file stream is opend as a pipe stream.
34  
35 =head2 no_destroy
36  
37 C<has no_destroy : ro byte;>
38  
39 Do not call the L</"DESTROY"> method.
40  
41 =head1 Instance Methods
42  
43 =head2 DESTROY
44  
45 C<method DESTROY : void ();>
46  
47 The destructor.
48  
49 If the L<"no_destroy"> field is a true value, nothing is done.
50  
51 If the L<"closed"> field is a false value, the file is closed.
52  
53 If the the L</"opened_by_popen"> field is a true value, the file is closed by the C<pclose> function, otherwise closed by the C<fclose> function.
54  
55 =head1 See Also
56  
57 =over 2
58  
59 =item * L<Sys|SPVM::Sys>
60  
61 =back
62  
63 =head1 Copyright & License
64  
65 Copyright (c) 2023 Yuki Kimoto
66  
67 MIT License
68