ZIP_SOURCE_FILE(3) Library Functions Manual ZIP_SOURCE_FILE(3)NAME
zip_source_file - create data source from a file
LIBRARY
libzip (-lzip)
SYNOPSIS
struct zip_source * zip_source_file(struct zip *archive, const char *fname); "zip_uint64_t start" "zip_int64_t len"
DESCRIPTION
The function zip_source_file creates a zip source from a file. zip_source_file opens fname and reads len bytes from offset start from it.
If len is 0 or -1, the whole file (starting from start ) is used.
The fie is opened and read when the data from the source is used, usually by zip_close.
RETURN VALUES
Upon successful completion, the created source is returned. Otherwise, NULL is returned and the error code in archive is set to indicate
the error.
ERRORS
zip_source_file fails if:
[ZIP_ER_INVAL]
fname, start, or len are invalid.
[ZIP_ER_MEMORY]
Required memory could not be allocated.
[ZIP_ER_OPEN]
Opening fname failed.
SEE ALSO libzip(3), zip_add(3), zip_replace(3), zip_source_buffer(3), zip_source_filep(3), zip_source_free(3), zip_source_function(3),
zip_source_zip(3)AUTHORS
Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at>
NiH August 1, 2008 ZIP_SOURCE_FILE(3)
Check Out this Related Man Page
ZIP_SOURCE_FILEP(3) Library Functions Manual ZIP_SOURCE_FILEP(3)NAME
zip_source_filep - create data source from FILE *
LIBRARY
libzip (-lzip)
SYNOPSIS
struct zip_source * zip_source_filep(struct zip *archive, FILE *file); "zip_uint64_t start" "zip_int64_t len"
DESCRIPTION
The function zip_source_filep creates a zip source from a file stream. zip_source_filep reads len bytes from offset start from the open
file stream file. If len is 0 or -1, the whole file (starting from start ) is used.
RETURN VALUES
Upon successful completion, the created source is returned. Otherwise, NULL is returned and the error code in archive is set to indicate
the error.
ERRORS
zip_source_filep fails if:
[ZIP_ER_INVAL]
file, start, or len are invalid.
[ZIP_ER_MEMORY]
Required memory could not be allocated.
SEE ALSO libzip(3), zip_add(3), zip_replace(3), zip_source_buffer(3), zip_source_file(3), zip_source_free(3), zip_source_function(3),
zip_source_zip(3)AUTHORS
Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at>
NiH August 1, 2008 ZIP_SOURCE_FILEP(3)
i have the below script
grep `basename $fname | cut -c2-5` $STORE_LIST` >> all
cat $fname >> all
the output comes in two line..i want the same output above to come in single line ..can someone help (5 Replies)
hi friend i am facing problem in taking input from a file to the variable ..
read fname
if
then
cd $fname
pwd
ls > new_temp1
cat new_temp1
fi
terminal=`tty`
exec < $new_temp1
while read line
do
echo $line
done
exec < $terminal (2 Replies)
Hi,
I am running this is korn shell
cp $source/$fname $dest/dir && rm $source/$fname
This was returned:
rm: /dir/file not removed: No such file or directory
The file could be found in the $dest directory which meant the cp was success.
The above code is used in a for loop to move... (5 Replies)
i am finding some pattern this way..
fname=`grep -w "^$index" $HOME/UnixCw/backup/Path.txt`
how to check that fname is empty i.e. if pattren doesnt found then i want to do other operations.... (7 Replies)
can u plz tell me where is the error
echo enter the filename to be searched
read fname
if #-d $fname
then
echo file exists
if
then
echo itsa directory
elif
then
echo its readable
cat $fname
else
echo its not readable
fi
else
... (1 Reply)
trying to extract the numbers in this file name:
fname="ebcdic.f0633.cmp_ebcdic.f0633.bin"
fnametmp=${fname#*(V|v|F|f)}
parse=${fnametmp%%(ENC|enc|CMP|cmp|BIN|bin)}}
echo FLRECL=$parse
result is FLRECL=0633.cmp_ebcdic.f0633
expected result FLRECL=0633
my guru is on holiday and i need... (5 Replies)
Hi everyone,
I am new to the linux.I wrote a small script and assigning two values to fname and lname and I want if the fname or lname are not given proper name like Toys or Gun the script should terminate and if they are given proper name it should execute.please help thanks:wall:
#!/bin/bash... (4 Replies)