1File::TreeCreate(3)   User Contributed Perl Documentation  File::TreeCreate(3)
2
3
4

NAME

6       File::TreeCreate - recursively create a directory tree.
7

VERSION

9       version 0.0.1
10

SYNOPSIS

12           use File::TreeCreate ();
13
14           my $t = File::TreeCreate->new();
15
16           my $tree = {
17               'name' => "tree-create--tree-test-1/",
18               'subs' => [
19                   {
20                       'name'     => "b.doc",
21                       'contents' => "This file was spotted in the wild.",
22                   },
23                   {
24                       'name' => "a/",
25                   },
26                   {
27                       'name' => "foo/",
28                       'subs' => [
29                           {
30                               'name' => "yet/",
31                           },
32                       ],
33                   },
34               ],
35           };
36
37           $t->create_tree( "./t/sample-data/", $tree );
38
39           # TEST
40           is_deeply(
41               $t->ls("./t/sample-data/tree-create--tree-test-1"),
42               [ "a", "b.doc", "foo" ],
43               "Testing the contents of the root tree"
44           );
45

DESCRIPTION

47       This module was extracted from several near-identical copies used in
48       the tests of some of my CPAN distributions.
49

METHODS

51   $obj->cat($path)
52       Slurp the file.
53
54   $obj->create_tree($unix_init_path, $tree)
55       create the tree.
56
57   $obj->exist($path)
58       Does the path exist
59
60   $obj->get_path($path)
61       Canonicalize the path from UNIX-like.
62
63   $obj->is_dir($path)
64       is the path a directory.
65
66   $obj->is_file($path)
67       is the path a file.
68
69   $obj->ls($dir_path)
70       list files in a directory
71
72   my $obj = File::TreeCreate->new()
73       Instantiates a new object.
74

SUPPORT

76   Websites
77       The following websites have more information about this module, and may
78       be of help to you. As always, in addition to those websites please use
79       your favorite search engine to discover more resources.
80
81       •   MetaCPAN
82
83           A modern, open-source CPAN search engine, useful to view POD in
84           HTML format.
85
86           <https://metacpan.org/release/File-TreeCreate>
87
88       •   RT: CPAN's Bug Tracker
89
90           The RT ( Request Tracker ) website is the default bug/issue
91           tracking system for CPAN.
92
93           <https://rt.cpan.org/Public/Dist/Display.html?Name=File-TreeCreate>
94
95       •   CPANTS
96
97           The CPANTS is a website that analyzes the Kwalitee ( code metrics )
98           of a distribution.
99
100           <http://cpants.cpanauthors.org/dist/File-TreeCreate>
101
102       •   CPAN Testers
103
104           The CPAN Testers is a network of smoke testers who run automated
105           tests on uploaded CPAN distributions.
106
107           <http://www.cpantesters.org/distro/F/File-TreeCreate>
108
109       •   CPAN Testers Matrix
110
111           The CPAN Testers Matrix is a website that provides a visual
112           overview of the test results for a distribution on various
113           Perls/platforms.
114
115           <http://matrix.cpantesters.org/?dist=File-TreeCreate>
116
117       •   CPAN Testers Dependencies
118
119           The CPAN Testers Dependencies is a website that shows a chart of
120           the test results of all dependencies for a distribution.
121
122           <http://deps.cpantesters.org/?module=File::TreeCreate>
123
124   Bugs / Feature Requests
125       Please report any bugs or feature requests by email to
126       "bug-file-treecreate at rt.cpan.org", or through the web interface at
127       <https://rt.cpan.org/Public/Bug/Report.html?Queue=File-TreeCreate>. You
128       will be automatically notified of any progress on the request by the
129       system.
130
131   Source Code
132       The code is open to the world, and available for you to hack on. Please
133       feel free to browse it and play with it, or whatever. If you want to
134       contribute patches, please send me a diff or prod me to pull from your
135       repository :)
136
137       <https://github.com/shlomif/perl-File-TreeCreate>
138
139         git clone git://github.com/shlomif/perl-File-TreeCreate.git
140

AUTHOR

142       Shlomi Fish <shlomif@cpan.org>
143

BUGS

145       Please report any bugs or feature requests on the bugtracker website
146       <https://github.com/shlomif/perl-File-TreeCreate/issues>
147
148       When submitting a bug or request, please include a test-file or a patch
149       to an existing test-file that illustrates the bug or desired feature.
150
152       This software is Copyright (c) 2021 by Shlomi Fish.
153
154       This is free software, licensed under:
155
156         The MIT (X11) License
157
158
159
160perl v5.34.0                      2021-08-27               File::TreeCreate(3)
Impressum