Граф коммитов

41 Коммитов

Автор SHA1 Сообщение Дата
jaggernaut%netscape.com e91f8a147e Bug 86734: Remove NS_WITH_SERVICE. r=dbaron, rs=scc, a=asa 2001-07-25 07:54:28 +00:00
pete%alphanumerica.com f020dcc1cd Fix for nsIFile delete conflicts with JS reserved name b=37406, r=dougt, sr=jst
Renamed all Delete methods to Remove.

--pete
2001-07-24 18:38:25 +00:00
valeski%netscape.com 169a5140b5 r=rpotts. comment changes only. 48726. adding status to idl files of api rev. ifaces. 2001-03-24 00:22:18 +00:00
brendan%mozilla.org a791fb2253 Fixes to use atomic rename(2) if possible in nsLocalFile::MoveTo (33098, r=?),
plus a bunch of other fixes and cleanups:

- Fix comment misstatements of fact in nsIFile.idl, improve style slightly.
- Fix typo in comment in nsILocalFile.idl.
- Avoid gratuitous nsCString and nsXPIDLCString copy-constructions, which
  entail malloc'ing, in nsLocalFileUnix.cpp's CopyTo and GetParent methods.
  But do use nsXPIDLCString instead of raw nsMemory::Alloc/Free.
- Get rid of unnecessary mLL_II2L and mLL_L2II macros, use "prlong.h" API only.
  Also use the LL_* macros consistently in case a Unix lacking long long type
  support wants to use this code.
* BTW, the "Date" methods should be renamed to use "Time" instead -- after all
  PRTime is the type, and traditionally "time" refers to the time-number, a
  scalar independent of one's position on the surface of the earth, while
  "date" refers to a struct full of locale-specific information derived from
  time and some "environment" variables such as DST.  Can we rename these
  nsIFile methods before Mozilla 0.9 / Netscape 6?
- Use CHECK_mPath consistently and first, before any assertions relating to
  arguments (which logically come after the 'this' parameter CHECK_mPath is
  making assertions about).
- Use nsCOMPtr for singly-inheriting implementations of XPCOM interfaces, to
  avoid scary-when-scaled 0-refcnt instances from being handled (these all
  got a ref via QI or equivalent soon enough, but you never know).  This also
  removed some naked deletes.
- Canonize all paths copied into mPath to lack trailing slashes, so we don't
  need to strip trailing slashes elsewhere, in higher-frequency methods (you
  set path less often than you get it or a substring of it).
- ssize_t for strlen return values.
- Since shaver used a function pointer to consolidate creat/mkdir logic, but
  didn't fold the necessary close of the new fd returned by non-failing creat
  into the pointed-at function, I did that.
- AppendRelativePath forbids .. as a component (bounded by / or beginning or
  end of string on either side), not just in the middle of fragment (so that
  foo..bar is not an illegal relative pathname -- it should not be).  BTW,
  what the heck is the difference between NS_ERROR_FILE_UNRECOGNIZED_PATH and
  ...INVALID_PATH?
- SetLeafName was overallocating the new pathname buffer by failing to subtract
  the old leafname's length.
- CopyTo was failing to return an NSRESULT_FOR_ERRNO(), it just called that
  macro on a line by itself -- eek!  It also contained redundant if (newFD
  == nsnull) {...} cleanup code, it did a useless PR_GetFileInfo call, and it
  leaked FDs on read or write error.
- Implemented CopyToFollowingLinks as a forwarded call to CopyTo, Unix does
  not support "copying" a symlink via normal file i/o.  Should we instead
  lstat in CopyTo and if a link is the source of the copy, do readlink and
  then symlink?
- Fixed the readlink method (GetTarget) to null-terminate the link string in
  the out parameter (readlink does not do that for you).
- Lots of little nsnull vs. NULL vs. 0, == and != applied to boolean or null
  literals, white-space, indentation, bracing, comment, and sloppy code order
  (e.g., declaring an initialized variable that's not used till after early
  returns) fixes.  Also invert some return logic so that NS_OK is the normal,
  least indented, final return.
2000-09-19 00:22:41 +00:00
rayw%netscape.com 0257791053 Bug 37275, Changing value of all progids, and changing everywhere a progid
is mentioned to mention a contractid, including in identifiers.

r=warren
2000-09-13 23:57:52 +00:00
warren%netscape.com 9fc7180eb9 Added URL attribute to nsIFile (why: because (a) needs to vary for different implementations, and (b) need to factor out of necko for installer). Not implemented yet. 2000-09-12 08:05:13 +00:00
dougt%netscape.com ee20e4ebcb nsIFile unique file creation is racy and insecure
bug 43314. a=brendan@mozilla.org
written by Robert O'Callahan <roc+moz@cs.cmu.edu>
2000-06-24 01:50:53 +00:00
mscott%netscape.com 0152413cae Bug #33768 --> add MakeUnqiue to nsIFile. this is actually dougt's code.
r=mscott
2000-06-21 06:32:45 +00:00
dougt%netscape.com 5f08efa2cf fixing confusing comment. 38553 2000-05-21 05:42:57 +00:00
brendan%mozilla.org 168c70825d Comment grammar and style fixes. 2000-05-15 06:41:00 +00:00
dougt%netscape.com a942da7d9f Fixes bug 38553. Using usecs now. r=sgehani@netscape.com 2000-05-09 19:11:14 +00:00
ftang%netscape.com c1c131590f 1. small fix on nsLocalFileCommon.cpp to fix unix warrning
2. add unicode methods to nsIFile/nsILocalFile idl
3. add nsLocalFileCommon.cpp to the unix and window makefile
2000-04-20 22:53:29 +00:00
blizzard%redhat.com 33ad4046c8 change nsIFile::Spawn to take an array of arguments instead of just a single flat string. bug #27843. r=dougt, a=chofmann. also, implement nsIFile::Normalize for unix. bug #17948. r=shaver, a=chofmann 2000-02-17 15:35:54 +00:00
sdagley%netscape.com 8bb810068e Added comment warning that the file size attribute only deals with the data fork on the Mac and point to Mac specific interface for dealing with the size of the combined forks. r=none as this is just cleanup. 2000-02-04 23:06:56 +00:00
dougt%netscape.com 60f34b55dc Renaming IsContainedIn to contains. Fixing implementation on unix. 2000-01-28 23:53:59 +00:00
dougt%netscape.com 4e572a8752 Changing CID format. r=dveditz 2000-01-28 23:38:20 +00:00
norris%netscape.com 99cce9c9ea Fix crash while loading jar: URI.
r=dougt
2000-01-27 15:58:23 +00:00
dougt%netscape.com 0b0346079c Landing nsIFile. 2000-01-24 21:28:28 +00:00
dougt%netscape.com 95f50f9301 1. First cut of a Special System Directory replacement (nsDirectoryService).
It is a nsIProperty.

2. Updates to the nsIFile and nsILocalFile interfaces based on conversations
   with warren. (thanks)

3. Updated windows mac and unix implementations based on interface changes.
   Mac and windows changes need to be reviewed.


                          Not part of build.
1999-12-22 01:56:45 +00:00
dougt%netscape.com 8b94c587f9 removing MoveToFollowingLinks(). It was discussed that was not needed due
to links being broken. r=shaver

more tweeks to get symlinks working correct on windows.

not part of the build yet.
1999-12-08 02:07:38 +00:00
dougt%netscape.com 0594eec67d adding some error codes which I will need. 1999-12-04 01:18:48 +00:00
dougt%netscape.com 6798955ef2 Removing Dir enumerator as it will be part of nsIFile
removing nsFileUtils.
Changing the name of nsIFile children to directoryEntries
removing nsIFile trucate.
Rewrote large parts of nsIFileImplWin to use native APIs.

not part of build
1999-12-03 00:39:31 +00:00
dougt%netscape.com f25f716d38 Fix tabs.
added enumerator.
1999-12-02 21:45:50 +00:00
dougt%netscape.com 34cd89d967 Removing init() methods as warren suggested. These now live in the new
nsILocalFile interface.
1999-12-02 07:49:57 +00:00
dougt%netscape.com 3456b189e3 Changes to the nsIFile.idl which were discussed between shaver, brendan,
sdagley and I.  not part of the build.
1999-12-02 01:19:10 +00:00
warren%netscape.com 2db26922a6 Landing no_neckoutil2_branch. Bug #11159. Removes neckoutil_s.lib from build which helps beos and openvms. 1999-11-30 04:50:42 +00:00
shaver%netscape.com 24299cc8ca - Portions of nsIFile and nsIDirectoryEnumerator implementations for Unix.
- Various missing-newline-at-end-of-file fixes from Andrew Taylor
  <Andrew.Taylor@cal.montage.ca>.
- Fixed case in nsIDirectoryEnumerator.idl
- Added |normalize()|, |truncate()| and |target|, |isSpecial()| to nsIFile.idl
- Changed |isExists()| to |exists()|, |fileName| to |leafName|, |isEqual()| to
  |equals| and added |in boolean recur| to |isContainedIn()|.
- Corrected widespread misspelling of |NS_ERROR_FILE_UNRECOGNIZED_PATH|.
- Partially updated Windows code to track changes.
Partially addresses 17948, r=dougt
1999-11-29 14:55:03 +00:00
dmose%mozilla.org 142ac52eaf updated xPL license boilerplate to v1.1, a=chofmann@netscape.com,r=endico@mozilla.org 1999-11-06 03:43:54 +00:00
dougt%netscape.com 8ebbab5553 Adding a set accessor to the permissions functions. Needed by the xpinstall
folks.
1999-11-01 04:44:56 +00:00
dougt%netscape.com 21a9bec623 Cleanup.
Removing convertTo* routines

Not hooked up to build yet.
1999-10-26 19:34:56 +00:00
dougt%netscape.com 47cdf76e92 changed license. 1999-10-25 22:45:56 +00:00
dougt%netscape.com cfd61bd0f8 Modification based on design review.
(THIS IS NOT PART OF THE BUILD YET)
1999-10-23 04:51:35 +00:00
dougt%netscape.com efc5b44b57 removing const from nsIFile types 1999-09-20 21:48:30 +00:00
dougt%netscape.com 00725ef8f7 changing GetDiskSpaceAvailable to return a signed 64 bit value 1999-09-10 20:03:56 +00:00
dougt%netscape.com 41a7fa078c nsFileSpec::GetDiskSpace now returns a PRUint64. (12479)
thanks to Chet Murphy <cmurphy@modelworks.com> for the windows code!
1999-09-09 19:20:35 +00:00
dougt%netscape.com d674f8af60 Adding buffered output to nsIFileStream.
Renaming nsIFile to nsIOpenFile.
commenting out a testcase in FilesTest.cpp which fails.  evil, i know.
1999-09-08 20:12:35 +00:00
dougt%netscape.com 48971bb399 more changes from conversations with brendan@mozilla.org 1999-09-01 23:51:11 +00:00
dougt%netscape.com ce7a03de0f more changes based on feedback. 1999-08-25 06:11:14 +00:00
dougt%netscape.com f12b07d23a more changes as suggested by warren@netscape.com 1999-08-24 21:51:32 +00:00
dougt%netscape.com 58c8f1c12b Adding Append() and ResolveSymlink() 1999-08-24 00:47:02 +00:00
dougt%netscape.com 0fb6e99473 first cut of a new file class. 1999-08-21 07:38:26 +00:00