Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

anydata::storage::file(3pm) [debian man page]

AnyData::Storage::File(3pm)				User Contributed Perl Documentation			       AnyData::Storage::File(3pm)

NAME
AnyData::Storage::File -- manipulate files with rich warnings DESCRIPTION
Opens, reads from, writes to, creates and destroys files with numerous options for error handling, flocking, binmode, etc. The simplest form is the equivalent of my $f = AnyData::Storage::File->new(dirs=>@dirs,flock=>1); my $str1 = $f->adSlurp($file); for( @dirs ) { open(IN,$file) or die $!; } sub slurp { local *IN; local $/ = undef; } But, depending on how you set the default behaviour SYNOPSIS
use AnyData; my $f = AnyData::Storage::File->new; $f->set('binmode',1|0); $f->set('PrintError',1|0); $f->set('RaiseError',1|0); $f->set('Trace',1|0); $f->set('f_dir',$dir|$dir_array) < input, fail if doesn't exist > output, truncate if exists, create if doesn't >> append, create if doesn't exist +< read/write, fail if doesn't exist r = < r+ = new() my $f = AnyData::Storage::File->new; or my $f = AnyData::Storage::File->new( %flags ); %flags is a hash which can contain any or all of: f_dir => $directory, # defaults to './' ( binmode => $binmode, # defaults to 0 (doesn't binmode files) printError => $warnings, # defaults to 1 (print warning on errors) open_local_file( $fname, $mode ); Mode is one of a = append open for reading & writing, create if doesn't exist r = read open for reading, fail if doesn't exist u = open open for reading & writing, fail if doesn't exist c = create open for reading & writing, fail if it already exists o = overwrite open for reading & writing, overwrite if it already exists Additionally, all modes fail if the file can't be opened. On systems that support flock, 'r' fails if a shared lock can not be obtained; the other modes fail if an exclusive lock can't be obtained. perl v5.10.1 2004-08-17 AnyData::Storage::File(3pm)

Check Out this Related Man Page

MooseX::Storage::IO::File(3pm)				User Contributed Perl Documentation			    MooseX::Storage::IO::File(3pm)

NAME
MooseX::Storage::IO::File - A basic File I/O role VERSION
version 0.45 SYNOPSIS
package Point; use Moose; use MooseX::Storage; with Storage('format' => 'JSON', 'io' => 'File'); has 'x' => (is => 'rw', isa => 'Int'); has 'y' => (is => 'rw', isa => 'Int'); 1; my $p = Point->new(x => 10, y => 10); ## methods to load/store a class ## on the file system $p->store('my_point.json'); my $p2 = Point->load('my_point.json'); METHODS
load ($filename) store ($filename) Introspection meta BUGS
All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT. AUTHORS
o Chris Prather <chris.prather@iinteractive.com> o Stevan Little <stevan.little@iinteractive.com> o XXXX XXX'XX (Yuval Kogman) <nothingmuch@woobling.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2007 by Infinity Interactive, Inc.. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.18.2 2013-12-21 MooseX::Storage::IO::File(3pm)
Man Page

15 More Discussions You Might Find Interesting

1. AIX

Aix 5.3

Dear ALL, We are installing AIX 5.3, Can any one suggest me, 1) Preffered Storage Allocation 2) File System Structure 3) Maintainance Level 4) Specific patches need to be added 5) Software tools to be installed,if any. Thanks for your help, Regards, Satya (3 Replies)
Discussion started by: smandala.in
3 Replies

2. UNIX for Dummies Questions & Answers

Directory exists

Hi all, Sorry about this i'm sure this is a very silly question hence an easy answer but: I'm trying to write a script, part of which I want to check if a directory exists, if it doesn't then create it. Thanks for your help Tez (3 Replies)
Discussion started by: tez
3 Replies

3. UNIX for Dummies Questions & Answers

File Name

I want to create a file so that it is not listed either using "ls" or its options. How can i do that? please help (3 Replies)
Discussion started by: banka
3 Replies

4. Programming

File - reading - Performance improvement

Hi All I am reading a huge file of size 2GB atleast. I am reading each line and cutting certain columns and writing it to another file. Here is the logic. int main() { string u_line; string Char_List; string u_file; int line_pos; string temp_form_u_file; ... (10 Replies)
Discussion started by: dhanamurthy
10 Replies

5. UNIX for Dummies Questions & Answers

reading ,writing,appending ,manipulating a file.

Hi my prob statement is to create a new file or to append to the 1tst file the followign chages. File 1: txt file. portfolio No a b c d abc 1 Any Any Any charString cds 2 values values values charString efd 3 can can can charString fdg 4 come come come charString... (4 Replies)
Discussion started by: szchmaltz
4 Replies

6. Shell Programming and Scripting

argument count

I'm writing a program that takes input from the user of a phone number or a name then either tells them if that entry doesn't exist in a text document or returns the entry if it does exist. But if they enter a name AND number it either returns the entry if it exists or adds it to the document. To... (17 Replies)
Discussion started by: javajynx
17 Replies

7. Emergency UNIX and Linux Support

Read file and change a 0 to a 1 in output

<key>ExcludeSimpleHostnames</key> <integer>0</integer> <key>FTPPassive</key> Need simple command that will change the 0 to a 1 in this file when I grep it, but only for this integer key directly after the ExcludeSimpleHostnames key. I got this output code... (8 Replies)
Discussion started by: glev2005
8 Replies

8. UNIX for Advanced & Expert Users

script to recursively change permissions on file and dirs differently?

Hi there, I need to change all files/dirs 1. all files with 744 2. all dirs with 755 is there a script for that ? thanks, thegunman (13 Replies)
Discussion started by: TheGunMan
13 Replies

9. UNIX for Dummies Questions & Answers

Storage from SAN

hi guys I installed Centos 5.5 (local disk). I am using 2 HBAs Now I mapped 5 LUNs from a Storage. I will be using LVM just to test I assigned a LUN I've read I have to use multipath to avoid my Centos see the LUN twice I enabled mdmpd and multipathd... something else I should do? ... (8 Replies)
Discussion started by: kopper
8 Replies

10. Programming

unexpected values received when writing and reading from file

In the code below i try to write and read from a file, but i get unexpected results, like after writing i cannot open the file, and when reading the file the value entered earlier is not shown bool creat_fragments(int nFragment) { int fd, rand_value; char frag_path, buf; for(int... (8 Replies)
Discussion started by: saman_glorious
8 Replies

11. Shell Programming and Scripting

Newbie.. Find if a file exists and open, if not create the desired file..

Hey all, I'm brand new to script writing, I'm wanting to make a script that will ask for a file and then retrieve that file if it exists, and if it doesn't exist, create the file with the desired name, and I'm completely stuck.. so far.. #! bin/bash echo "Enter desired file" read "$file" if ... (5 Replies)
Discussion started by: Byrang
5 Replies

12. UNIX for Dummies Questions & Answers

**HELP** how to do a listing of dirs and all sub dirs only

I am trying to get a listing of ALL directories only under /export (as an example). I can get all the dirs directly under /export but I need any sub dirs under those dirs. I've looked (here and google) but can not find anything that works (4 Replies)
Discussion started by: bbraml
4 Replies

13. Solaris

File Table full problem

Hi All, In my Big brother monitoring, I can see File table is 97.4% full. On searching more, I can see it is complaining for kernel open files, it seems. If it is issue of too many open files, can we resolve it with reboot ? # /usr/local/bin/lsof | wc -l 89132 /# /usr/local/bin/lsof | grep... (4 Replies)
Discussion started by: solaris_1977
4 Replies

14. Shell Programming and Scripting

open files with multiple indexes

Hi, I want to work with multiple files which all contain 2 numbers. I tried to make a nested for loop but for some reason it doesn't recognize the $j as a number. The output is cannot open file `175-T-pvalue.xls'. How do I make sure that it takes the numbers from the inner loop as $j? ... (4 Replies)
Discussion started by: linseyr
4 Replies

15. Programming

how to get all files on a directory of .c file

i need to get all files names on a c file directory to I can open every file and read from them to write on other files...... I solved the problem of reading and writing for a specific file to another file .... but i want that for text files in .c file directory so how to read a names of... (5 Replies)
Discussion started by: fwrlfo
5 Replies