2005-10-26 02:05:53 +00:00
|
|
|
/*
|
2005-11-01 03:14:49 +00:00
|
|
|
$Id: udf_time.h,v 1.4 2005/11/01 03:14:50 rocky Exp $
|
2005-10-26 02:05:53 +00:00
|
|
|
Copyright (C) 2005 Rocky Bernstein <rocky@panix.com>
|
|
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \file udf_time.h
|
|
|
|
|
*
|
|
|
|
|
* \brief UDF time conversion and access files.
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef UDF_TIME_H
|
|
|
|
|
#define UDF_TIME_H
|
|
|
|
|
|
|
|
|
|
#include <time.h>
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
2005-10-30 14:10:44 +00:00
|
|
|
/*!
|
|
|
|
|
Return the access time of the file.
|
|
|
|
|
*/
|
2005-11-01 03:14:49 +00:00
|
|
|
time_t udf_get_access_time(const udf_dirent_t *p_udf_dirent);
|
2005-10-30 14:10:44 +00:00
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
Return the attribute (most recent create or access) time of the file
|
|
|
|
|
*/
|
2005-11-01 03:14:49 +00:00
|
|
|
time_t udf_get_attribute_time(const udf_dirent_t *p_udf_dirent);
|
2005-10-30 14:10:44 +00:00
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
Return the modification time of the file.
|
|
|
|
|
*/
|
2005-11-01 03:14:49 +00:00
|
|
|
time_t udf_get_modification_time(const udf_dirent_t *p_udf_dirent);
|
2005-10-30 14:10:44 +00:00
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
Return the access timestamp of the file
|
|
|
|
|
*/
|
2005-11-01 03:14:49 +00:00
|
|
|
udf_timestamp_t *udf_get_access_timestamp(const udf_dirent_t *p_udf_dirent);
|
2005-10-30 14:10:44 +00:00
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
Return the modification timestamp of the file
|
|
|
|
|
*/
|
2005-11-01 03:14:49 +00:00
|
|
|
udf_timestamp_t *udf_get_modification_timestamp(const udf_dirent_t
|
|
|
|
|
*p_udf_dirent);
|
2005-10-30 14:10:44 +00:00
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
Return the attr timestamp of the file
|
|
|
|
|
*/
|
2005-11-01 03:14:49 +00:00
|
|
|
udf_timestamp_t *udf_get_attr_timestamp(const udf_dirent_t *p_udf_dirent);
|
2005-10-30 14:10:44 +00:00
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
Convert a UDF timestamp to a time_t. If microseconds are desired,
|
|
|
|
|
use dest_usec. The return value is the same as dest. */
|
|
|
|
|
time_t *udf_stamp_to_time(time_t *dest, long int *dest_usec,
|
2005-10-26 02:05:53 +00:00
|
|
|
const udf_timestamp_t src);
|
|
|
|
|
|
2005-10-30 14:10:44 +00:00
|
|
|
udf_timestamp_t *udf_timespec_to_stamp(const struct timespec ts,
|
|
|
|
|
udf_timestamp_t *dest);
|
2005-10-26 02:05:53 +00:00
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
|
|
#endif /*UDF_TIME_H*/
|