5 our @EXPORT_OK = qw(create_scanned create_uploaded create_created);
6 our %EXPORT_TAGS = (ALL => \@EXPORT_OK);
12 $params{source} = 'scanner1';
13 $params{file_type} = 'document';
14 $params{file_path} = '/var/tmp/'.$params{file_name} if !$params{file_path};
15 open(OUT,"> ".$params{file_path});
16 print OUT $params{file_contents};
18 delete $params{file_contents};
19 my $file = _create_file(%params);
20 unlink($params{file_path});
26 $params{source} = 'uploaded';
27 $params{file_type} = 'attachment';
28 return _create_file(%params);
33 $params{source} = 'created';
34 $params{file_type} = 'document';
35 return _create_file(%params);
41 my $fileobj = SL::File->save(
42 mime_type => 'text/plain',
43 description => 'Test File',
45 # file_type => $params{file_type},
46 # source => $params{source},
47 # file_name => $params{file_name},
48 # file_contents => $params{file_contents},
49 # file_path => $params{file_path}
60 SL::Dev::File - create file objects for testing, with minimal defaults
64 =head2 C<create_scanned %PARAMS>
66 =head2 C<create_uploaded %PARAMS>
68 =head2 C<create_created %PARAMS>
72 Martin Helmling E<lt>martin.helmling@opendynamic.deE<gt>