• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Reading file permissions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reading file permissions


  • Subject: Reading file permissions
  • From: David Kocher <email@hidden>
  • Date: Wed, 26 Nov 2003 18:37:51 +0100

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I am reading the file permissions from a file like this
NSDictionary localAttributes = NSPathUtilities.fileAttributes(file.getPath(), true);
int localPermissions = ((Integer)localAttributes.objectForKey(NSPathUtilities.FilePosixPermissi ons)).intValue();

What I am wondering how I can convert this integer to a number I am used to, like 644 representing rw-r--r--

Thanks for the introduction to 'posix permissions for dummies'
- --david


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)

iD8DBQE/xOTwdBH4SdTFvT4RAiYOAJ9lgfUszPYu5sZxQAGbblP2vwtGhwCfQedQ
kWM/qvSk5627CXPsCBjoi7Q=
=OxhY
-----END PGP SIGNATURE-----
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Need a dictionary of words in English
  • Next by Date: Re: Regex lib for NSString ?
  • Previous by thread: Re: Adding drag-n-drop support to NSButton ? Answer to myself
  • Next by thread: Re: Reading file permissions
  • Index(es):
    • Date
    • Thread