all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Get/Set file attributes
@ 2008-06-16 13:17 Nordlöw
  2008-06-16 14:31 ` Michael Albinus
       [not found] ` <mailman.13396.1213626598.18990.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Nordlöw @ 2008-06-16 13:17 UTC (permalink / raw)
  To: help-gnu-emacs

How do I get/set a files attributes, for example modification time
(touch)?

/Nordlöw


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Get/Set file attributes
  2008-06-16 13:17 Get/Set file attributes Nordlöw
@ 2008-06-16 14:31 ` Michael Albinus
       [not found] ` <mailman.13396.1213626598.18990.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Michael Albinus @ 2008-06-16 14:31 UTC (permalink / raw)
  To: Nordlöw; +Cc: help-gnu-emacs

Nordlöw <per.nordlow@gmail.com> writes:

> How do I get/set a files attributes, for example modification time
> (touch)?

See the functions `file-attributes', `visited-file-modtime', and
`set-visited-file-modtime'

> /Nordlöw

Best regards, Michael.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Get/Set file attributes
       [not found] ` <mailman.13396.1213626598.18990.help-gnu-emacs@gnu.org>
@ 2008-06-16 14:57   ` Nordlöw
  2008-06-16 21:22     ` Jason Rumney
  0 siblings, 1 reply; 5+ messages in thread
From: Nordlöw @ 2008-06-16 14:57 UTC (permalink / raw)
  To: help-gnu-emacs

On 16 Juni, 16:31, Michael Albinus <michael.albi...@gmx.de> wrote:
> Nordlöw <per.nord...@gmail.com> writes:
> > How do I get/set a files attributes, for example modification time
> > (touch)?
>
> See the functions `file-attributes', `visited-file-modtime', and
> `set-visited-file-modtime'
>
> > /Nordlöw
>
> Best regards, Michael.

How can I implement the touch-file() in emacs lisp?

/Nordlöw


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Get/Set file attributes
  2008-06-16 14:57   ` Nordlöw
@ 2008-06-16 21:22     ` Jason Rumney
  2008-06-16 21:47       ` Nordlöw
  0 siblings, 1 reply; 5+ messages in thread
From: Jason Rumney @ 2008-06-16 21:22 UTC (permalink / raw)
  To: help-gnu-emacs

On Jun 16, 3:57 pm, Nordlöw <per.nord...@gmail.com> wrote:

> How can I implement the touch-file() in emacs lisp?

(set-file-times "FILENAME")


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Get/Set file attributes
  2008-06-16 21:22     ` Jason Rumney
@ 2008-06-16 21:47       ` Nordlöw
  0 siblings, 0 replies; 5+ messages in thread
From: Nordlöw @ 2008-06-16 21:47 UTC (permalink / raw)
  To: help-gnu-emacs

On 16 Juni, 23:22, Jason Rumney <jasonrum...@gmail.com> wrote:
> On Jun 16, 3:57 pm, Nordlöw <per.nord...@gmail.com> wrote:
>
> > How can I implement the touch-file() in emacs lisp?
>
> (set-file-times "FILENAME")

Superb! Now I got it:

(defun touch-file (filename)
  "Touch FILENAME, that is set its modification time (modtime) to
current time."
  (interactive "fFile to touch: ")
  (set-file-times filename (current-time))
  )

Thanks,
Nordlöw


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-06-16 21:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-16 13:17 Get/Set file attributes Nordlöw
2008-06-16 14:31 ` Michael Albinus
     [not found] ` <mailman.13396.1213626598.18990.help-gnu-emacs@gnu.org>
2008-06-16 14:57   ` Nordlöw
2008-06-16 21:22     ` Jason Rumney
2008-06-16 21:47       ` Nordlöw

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.