Rename (C)

Rename (C)

rename is a function in the C programming language that renames a certain file.

The prototype of the function is::int rename(const char *oldname, const char *newname)

Zero is returned upon success, and other integers are returned upon failure.

The rename function is specified in the stdio.h library header file in C and the cstdio header in C++. It is specified in ANSI C.

In POSIX, rename will fail (with EXDEV) if the old and new names are on different mounted file systems. [man|sh|rename|SUS|rename a file] On Linux, if a call to rename succeeds it is guaranteed to have been atomic from the point of view of the current host.

References

* [http://www.cppreference.com/stdio/rename.html rename on cppreference.com]
* [http://www.cplusplus.com/ref/cstdio/rename.html rename on cplusplus.com]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • Rename — (re + name) is a word meaning change the name of something. Different areas, such as linguistics, relational algebra, and computer science incur renaming actions with different detailed activity, however the principles behind are all the same… …   Wikipedia

  • rename — UK US /ˌriːˈneɪm/ verb [T] ► to give something a new name: »It would be advisable to rename the file with a new file extension. »The company had been renamed on the change of ownership …   Financial and business terms

  • Rename — Re*name (r?*n?m ), v. t. To give a new name to. [1913 Webster] …   The Collaborative International Dictionary of English

  • rename — ► VERB ▪ give a new name to …   English terms dictionary

  • rename — [spelling only] …   English World dictionary

  • rename — [[t]ri͟ːne͟ɪm[/t]] renames, renaming, renamed VERB If you rename something, you change its name to a new name. [V n n] The Prime Minister is being pressed to rename child benefit child allowance ... [V n n] The party leader said the street should …   English dictionary

  • rename — UK [riːˈneɪm] / US [rɪˈneɪm] verb [transitive] Word forms rename : present tense I/you/we/they rename he/she/it renames present participle renaming past tense renamed past participle renamed to change the name of someone or something Many streets …   English dictionary

  • rename — verb Rename is used with these nouns as the object: ↑file …   Collocations dictionary

  • rename — re|name [ˌri:ˈneım] v [T usually passive] to give something a new name rename sth sth ▪ Myddleton Way was renamed Allende Avenue …   Dictionary of contemporary English

  • rename — verb (transitive usually passive) to give something a new name: rename sth sth: Myddleton Way was renamed Allende Avenue …   Longman dictionary of contemporary English

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”